Using Firebase and ionic.io platform authentication - ionic-framework

We are writing a mobile application using Ionic Framework and Firebase for our data storage. Now we are looking into the new Ionic Platform for easy deployment and easy push notifications features.
Now as we are going to use most of the Ionic Platform features, we would also like to use their authentication system, also because it makes sending push notifications to specific users easy from within our Ionic Platform dashboard and their API.
Now I am trying to figure out how to incorporate the Ionic User Authentication with Firebase.
In short: How can we link our Ionic users to our Firebase authentication and authorization?

At first glance, it looks like Ionic is providing a similar authentication services as Firebase does.
The point is, if you need to create user based security on the Firebase database, that is, limit data access based on the user identity, you will have to use the Firebase authentication.
In any case I don't see a scenario where you need both authentication systems together.

Related

Auth in Flutter using storage and cookie (not using Firebase)?

I am trying to build a login screen for Flutter right now. I have two questions related to how it works in Flutter.
I have my backend set with React and use cookies for auth check. Is it possible to store cookies like web in Flutter? I have cookie validation backend that it checks for valid cookies. Wondering if I can still use this in Flutter.
If I use a local storage approach, do I have to setup a permission request for that? And, if a user rejects then I can't use it correct? Moreover, does android users have access to this file?
I am not using Firebase, I have my own backend. Is there a best practice for Node <---> Flutter auth? Most questions or doc are related to Firebase.
There is no support for something like Android AccountManager yet, but there are some plugins that do similar things:
https://pub.dev/packages/accountmanager
https://pub.dev/packages/account_manager_plugin
/EDIT:
There is a CookieStore class if you want to store cookie
https://api.flutter.dev/flutter/dart-html/CookieStore-class.html

Custom oAuth system with back4app

I want to develop an app mobile (in Flutter) with a cloud backend (I have not another server).
With Firebase, it supports only 4 providers (Fb, Twitter, Google, Github).
I need to connect Strava oAuth and use this login in my backend service. So, back4app is perhaps the solution.
Here, listing of providers supported by back4app https://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication, but no Strava...
Another section here to use non supported provider : https://docs.parseplatform.org/parse-server/guide/#custom-authentication but how can I do ? I don't understand this section.
Thxs
Thanks, I've used Firebase with a external server ;)

Upload media to Firebase Storage from Standalone Apple Watch app

I'm trying to create an apple watch only app besides our app. This would be a standalone app without ties to the base app.
I can't use Firebase SDK-s, or other Google SDK-s as none of them support the watch.
I am trying to use the REST API-s and I hit a road block.
I can successfully retrieve a token for a user/password account with the identitytoolkit domain "https://identitytoolkit.googleapis.com/v1/accounts:signInWithPassword?key="
which gives me a token I am trying to use for the endpoint:
https://www.googleapis.com/upload/storage/v1/b/mybucketid/o?uploadType=media&name=test233
however this endpoint tells me that I'm unauthorized. When I use the token I get with from OAuth 2.0 playground it works.
The problem is that that one expires and I cant build the app with a new token every time obviously.
Could you tell me what I'm doing wrong? I can't open webviews on the watch to approve a sign in, also can't communicate with an iPhone as this is a standalone app. I need something thats just hardcoded pure code. This is still an experiment and wont go out to real users. A non-expiring token would also work for my use-case.
I changed my buckets policy in a way that my user should be able to write into it but its still giving me authorization issues.
I don't think you can upload to a Cloud Storage bucket that is secured by Firebase through the REST API with a Firebase Authentication user. Essentially the REST API doesn't know how to execute Firebase rules, and only accepts operations that come with an OAuth2 token from a collaborator on the project.
Can you authenticate with the iPhone app and get a token from there when the old one expires? I know you are building a standalone watch app, but maybe this is a compromise worth making. Then you could use Firebase Functions to upload the image, validate the token (admin.auth().verifyIdToken(token)) and push the image to Cloud Storage. I have not tried this with an image but have successfully submitted authenticated payloads to the Firebase Realtime Database REST endpoints from a watchKit app.

How to develop an app that integrates Google Home with Login using Node.js, Firebase and Swift

I have been making Google Home apps, but now I want to make apps that are connected to Firebase server and DialogFlow API. How is it possible to integrate user authentication in an ios app to identify that user who is using Google Home with that login state?
For example, if I make a restaurant ordering app, I want any user to make a request through Google Home and the user can check his/her ordering history on an ios app.
A user logs in through an app and then how does google home detect that user as a logged in user? I have been searching how to implement this, but nothing hits.
You will need to implement account linking for Actions on Google. This will require two server-side components that you'll need to build:
You'll need to create an OAuth server that will allow the user to authenticate to your service (and use Firebase auth as a component of this) and authorize the Google Assistant to access your service. It does this by generating tokens that it hands to the Assistant.
Your Dialogflow fulfillment webhook will get this token passed to it as part of the conversation. It uses this token to determine which user is making the request and confirm it is valid.
There are OAuth services that are available that work with Google's auth that you should be able to fit in here, or you can write your own using Firebase Hosting and Firebase Cloud Functions. The Dialogflow webhook can, of course, be done using Firebase Cloud Functions.

how to integrate app id to my existing microservice

I have a microservice which is running in docker container, can I integrate app id into my application? and do not change the application code.
Also, I only saw google and facebook login item on the log in widget,
how can I add IBM w3id to the widget?
can I store a username and password into appid? then clients can login using the pre-stored credential. how to implement this? thanks.
There should be no any problem to secure your application using App ID, but you need to update the application (backend) code if you need to protect REST APIs. If you need to authenticate your mobile app users only, there is no need to change the backend code (you can review our iOS and Android onboarding samples available in the service dashboard).
IBMid is not released to production yet, so currently there is no option to add it.
About customer credentials - we're working on Cloud Directory feature now, this scenario will be supported once we release it to production.
Thanks,
Vitaly