I have an app that requires authentication and I need to use Firebase, however, this authentication needs to be offline. I have seen someone do this with React Native, so how would I do this with Flutter?
There is no offline auth with Firebase Authentication. It is absolutely required the the user be online so that their identity can be verified with the authentication provider.
Related
I have a react native mobile app using expo which I have just published to expo host in order to share with a user. The app uses Firebase auth.
Users cannot sign up, they can only sign in. The sign up is done via the app and the app creates the user in Firebase with an email, password and the emailVerified set to true. Signin is set to email/password and is not via an oath provider.
However, the user cannot then sign in on the deployed app, getting Network Error on each attempt.
Everything works fine on local host on a dev version of Firebase auth.
I also have the same setup (in prod) for a react app which is hosted from the client’s domain. The user can log in to the react app without any problems.
The expo version I’m using is 43.0.3, react-native 0.64.3, firebase 8.10.0. Sign in is via an Android tablet.
What am I missing? Any help would be much appreciated.
Mick
Hi we get the Network Error from Firebase Auth/react-native app error if you have not enabled authentication .
go to firebase console select your project
enable authentication by email/password if you are using email/password for login and signup
I am building a Flutter app with Firebase Authentication. I am trying to find a way to ensure that the communication going to my backend is actually from the app I wrote and uploaded to the stores. I thought that I could be using the JWT provided as a result of the firebase login for this task to ensure that the logins can be made only from within my app.
I figured out that certain signs in email and password methods can be logged in from outside the app it was intended for. However, since google and phone sign-in require an SHA-1 key to be registered to the firebase project, I wondered if I could ensure that by restricting logins to these methods, only the trusted app can generate valid JWT and communicate with my backend.
I do not know much about security, so I would really appreciate any tips.
I want to use Firebase Authentication in my mobile app, however I want to host the mobile backend (REST API and database) on Azure. In this case, how would I get the identity information from Firebase over to Azure, e.g. how would I check in my Azure backend if a token sent from my mobile app to the Azure backend is valid, get the name of the logged in user etc?
You can use the Firebase Admin SDK to verify auth ID tokens sent from your app to your backend.
I need to identify a similar authentication in Google Cloud Platform like Google Firebase offers. I want to authenticate users by E-Mail and password.
I developed a web app that runs in GCP AppEngine. This web app authenticates users by their E-Mail and password. But I wont host a custom OAuth server. Is there a OAuth server or similar authentication service provided by GCP too?
Or should I use instead Google Firebase Authentication?
You can of course roll your own authentication, but it's also possible to use Firebase Authentication in combination with your own App Engine backend. Have the users sign in with Firebase Authentication in the client-side app, send the ID token over a secure connection from the client to your App Engine server, and then verify the ID token in your App Engine code.
You can create a Firebase project linked directly to your GCP project (just find your GCP project in the Firebase project creation dialog).
Depending on the required language, they have a couple of tutorials with explanations on how Firebase Auth and e.g. App Engine can work together with sample codes. See:
https://cloud.google.com/appengine/docs/standard/python/authenticating-users-firebase-appengine
I'm trying to integrate Firebase into a Unity WebGL app, unlike iOS and Android there's no official Firebase plugin for it.
I'd like to try and use the Unity WWW class to make web requests to endpoints to do firebase authentication.
Is there an endpoint I can call passing the username and password to firebase that will return an auth token?
No, that would be a massive security hole for the end user who gives up their password to you. Users should only be typing passwords directly into the site that controls their account.
You should probably take a look into calling through to JavaScript to use the Firebase web SDKs.
WebGL: Interacting with browser scripting
Yes, Firebase Auth has a REST API that sends the email/password combo (as POST parameters) in an https call.
Firebase Auth REST API Sign in with email / password