Questions tagged [firebase-authentication]
Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app.
2,441
questions
39
votes
4
answers
27k
views
Firebase android : make username unique
Parse will shut down at the end of the year, so I decided to start using Firebase. I need to implement a register process with 3 fields : email, username, password (Email & username must be unique ...
81
votes
20
answers
45k
views
Firebase kicks out current user
So I have this issue where every time I add a new user account, it kicks out the current user that is already signed in. I read the firebase api and it said that "If the new account was created, the ...
28
votes
5
answers
18k
views
Firebase UI authentication with google fails with message (code:10 message:10)
I've made a chat app that uses Firebase's feature Real-time database.
I face a problem with google authentication. The problem started when I downloaded the app from the Play Store, the authentication ...
72
votes
7
answers
63k
views
How do I return a list of users if I use the Firebase simple username & password authentication
Not sure if I am doing something wrong but using this api https://www.firebase.com/docs/security/simple-login-email-password.html I can successfully create a user - according to the return message, ...
2
votes
3
answers
4k
views
How to redirect multiple types of users to their respective Activities?
I am creating a voting app on Firebase. I have 3 types of users. So far i can successfully redirect 2 kinds of users (STUDENTS, TEACHERS) to their respective activities after they login all with the ...
47
votes
6
answers
60k
views
Undefined class 'FirebaseUser'
I'm new to Flutter. I have an Issue with Firebase Auth/ Google Auth
The FirebaseUser is not defined
Code:
FirebaseAuth _auth = FirebaseAuth.instance;
GoogleSignIn googleSignIn = GoogleSignIn();
...
35
votes
6
answers
22k
views
How do I lock down Firebase Database to any user from a specific (email) domain?
I have a small, personal Firebase webapp that uses Firebase Database. I want to secure (lock down) this app to any user from a single, specific domain. I want to authenticate with Google. I'm not ...
22
votes
1
answer
8k
views
Firestore - unexpected reads
there guys, I do have an interesting problem here and I would be really glad if any of you it will be able to help me with that.
What's my app flow:
Register with the email, password and some other ...
10
votes
3
answers
4k
views
One time login in app - FirebaseAuth
I'm working on an app that uses Firebase authentication to sign in users through phone number. I want to add a functionality such that there is only one-time login for the user, i.e. even if the user ...
18
votes
1
answer
5k
views
Is auth.uid a shared secret?
It appears that when someone authenticates via oAuth, Firebase creates a uid that looks something like google:111413554342829501512, for example.
In Firebase rules, you can do (read and/or write):
"....
425
votes
9
answers
371k
views
Convert Promise to Observable
I am trying to wrap my head around observables. I love the way observables solve development and readability issues. As I read, benefits are immense.
Observables on HTTP and collections seem to be ...
223
votes
9
answers
117k
views
How to protect firebase Cloud Function HTTP endpoint to allow only Firebase authenticated users?
With the new firebase cloud function I've decided to move some of my HTTP endpoint to firebase.
Everything works great... But i have the following issue. I have two endpoints build by HTTP Triggers (...
175
votes
4
answers
86k
views
Use multiple JWT Bearer Authentication
Is it possible to support multiple JWT Token issuers in ASP.NET Core 2?
I want to provide an API for external service and I need to use two sources of JWT tokens - Firebase and custom JWT token ...
14
votes
3
answers
4k
views
Locking down Firebase DB access to specific apps
I think from searching the web this is not technically possible but I want to ask again in case I'm missing something.
I have an app that uses Firebase. Reading and writing is locked down through ...
56
votes
2
answers
82k
views
How do I link each user to their data in Firebase?
I plan to create a main tree named users which will include the name different users used as username. So, from each username will be included their data e.g. Full Name, Address, Phone No.
I want to ...
28
votes
2
answers
30k
views
Firebase: setting additional user properties
I'd like to add a property to a Firebase user object. The user documentation says that I can only store additional properties using the Firebase real time database.
I am unsure on how this can works ...
298
votes
57
answers
286k
views
Flutter and google_sign_in plugin: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)
The dialog (Google form) for the credentials is opened successfully, but after I fill my credentials I'm getting this error. I followed the instructions from here. Created a Firebase project, enabled ...
100
votes
27
answers
130k
views
This app is not authorized to use Firebase Authentication.Please verify that the correct package name and SHA-1 are configured in the Firebase Console
Firebase auth was working fine, the debug build suddenly started failing without any change of code, logging the folloing message
D/PhoneAuthActivity( 7392): signInWithCredential:failure:com.google....
55
votes
9
answers
52k
views
Add Extra Details on Firebase User Table
I'm working on a firebase+angularjs app and I'm using the simple email and password authentication and it's working properly.
I'm just wondering if I can add extra user data on the user table which ...
40
votes
7
answers
28k
views
How to disable Signup in Firebase 3.x
I have created some users using firebase.auth().signInWithEmailAndPassword and would like to stop signUp now, but keep signIn working. I tried some rules on users and even to stop writing to ...
25
votes
4
answers
21k
views
Username authentication instead of email
With Firebase I can sign up and login users using email addresses. However what if I want the app to be username based. For example, you would log in with "Bobzilla" instead of "[email protected]"?
Is ...
1
vote
2
answers
2k
views
Why did this code fail to send password reset link in firebase?
I am new to firebase and I am trying to handle firebase user authentication in React.js. I did manage to create users with email and passwords. But, now I would like to send the user an Email link to ...
7
votes
2
answers
2k
views
I Don't get Error codes of Firebase Auth in my Flutter App (I ONLY get INVALID_LOGIN_CREDENTIALS)
when i use FirebaseAuth.instance.signInWithEmailAndPassword() in my Flutter/Dart code, to test scenarios where users, for example, enter a wrong password or wrong email and etc. To get error codes, ...
101
votes
15
answers
53k
views
Google sign in not working after publishing in play store
I went through this, and as far as the process goes I did that.
But I when I installed the app from play store I am not able to sign in using the google sign in button.
I have used Firebase for ...
44
votes
3
answers
29k
views
Firebase email saying my realtime database has insecure rules
I recently received an email from firebase telling me that my realtime database has insecure rules. These are the rules that I have set:
{
"rules": {
".read": "auth != null",
".write": "...
46
votes
18
answers
77k
views
How to Handle Firebase Auth exceptions on flutter
Please does anyone know how to catch firebase Auth exceptions on flutter and display them?
Note: I am not interested in the console (catcherror((e) print(e))
I need something that is more effective, ...
28
votes
6
answers
19k
views
How to determine if a Firebase user is signed in using facebook authentication
I am using firebase from google and I have some trouble with user authentication. After logging with facebook I obtain FirebaseUser in AuthStateListener, but how can I detect if this user is logged ...
46
votes
2
answers
33k
views
Is it still possible to do server side verification of tokens in Firebase 3?
Is it still possible to do server side verification of tokens in Firebase 3?
We generate custom tokens (JWT) on a server running Golang using our existing authentication system (using a Service ...
10
votes
4
answers
8k
views
How can I detect if user first time in Firebase [duplicate]
I need to check if the user is signing in for the first time, and initialize their account with extra properties (points, membership, etc) if true.
May user change his device and wants login again on ...
8
votes
2
answers
9k
views
Using Custom Tokens to make REST requests to FB DB as an admin
I'm migrating to the new database and 3.0 client libs. I'm updating the part which generates a custom auth token (on our server) to do a PATCH to update a resource in the Firebase DB.
These PATCH ...
154
votes
31
answers
172k
views
Why do I get com.google.android.gms.common.api.ApiException: 10:?
private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {
try {
GoogleSignInAccount account = completedTask.getResult(ApiException.class); //exception is here
...
69
votes
13
answers
81k
views
Android Firebase DynamiteModule: Failed to load module descriptor
Since upgrading to the newest version of Firebase (9.0.0), I can't get rid of the following two errors when authenticating a user through signInWithEmailAndPassword(). Does anyone have an idea what's ...
42
votes
11
answers
40k
views
Google Firebase sign out and forget user in Android app
When I call mFirebaseAuth.signOut() or mFirebaseUser.delete() my FirebaseAuth.AuthStateListener() works correctly and returns null as FirebaseUser instance in onAuthStateChanged, I refresh UI and show ...
39
votes
2
answers
8k
views
Firebase Overwrites Signin with Google Account
There doesn't seem to be any mention of this in the documentation, and all I found was this and this, where I would like to confirm this:
If there is an existing account with the same email ...
90
votes
10
answers
75k
views
Can't get currentUser on load
When trying to check if a user is signed in via firebase.auth().currentUser like this:
if (firebase.auth().currentUser === null) {
console.log('User not signed in');
}
Whenever I refresh the page, ...
56
votes
6
answers
90k
views
Delete a specific user from Firebase
Is there a way I can get a specific user account from firebase and then delete it?
For instance:
// I need a means of getting a specific auth user.
var user = firebase.auth().getUser(uid);
// Note ...
3
votes
2
answers
8k
views
Adding new data to firebase users
I want to add a new data to firebase authentication which has data like displayname, phone number, image. But i want to add more such gender, birthday and more. is it possible to add new?
2
votes
4
answers
2k
views
What is the best way to authenticate two types of users (Student and Driver) in my android app using Firebase [duplicate]
I am developing an Android app for my university transportation service (buses). It allows students to know where the bus is using maps. In indicates the location of the bus in a map(google map)
I ...
1
vote
1
answer
1k
views
How to order the nodes in firebase console based on key
I have a node for users with key 1 to 1400 but it's not in order.
Hot to view this in order in the console. I had a similar experience with another node. But it later got ordered automatically
95
votes
4
answers
129k
views
How to use the Firebase refreshToken to reauthenticate?
I use the JS library call firebase.auth().signInWithEmailAndPassword(email, password) and get back a User object. The User object contains a refreshToken.
I use curl 'https://docs-examples.firebaseio....
74
votes
5
answers
66k
views
How to change the sms verification template in firebase phone auth
in console firebase, in the menu Authentification -> Templates
There is a sms verification template :
%LOGIN_CODE% is your verification code.
How to change this message template?
72
votes
9
answers
87k
views
Plugin project :firebase_core_web not found
I try to connect Android project to Firebase but I get this error as I added the following to pubsec.yaml:
firebase_auth: ^0.16.0
cloud_firestore: ^0.13.5
when I gradle run and it is not working
...
66
votes
5
answers
53k
views
How to provide user login with a username and NOT an email?
I'd like to use Firebase for my web app that is for people with dementia in a care home. They do not have email or social network accounts so will need a simple username / password sign up / sign in.
...
19
votes
1
answer
4k
views
Firebase Database - Risks associated with exposing uid on the client side?
Short question(s): What are the risks/problems if I expose another users' UID on the client side?
My circumstance:
I'm building a test android app that needs to be able to let 1) user foo request ...
13
votes
6
answers
44k
views
Retrieving a list of users who have registered using Firebase Auth
I am making an android chat application using firebase. So far I have made a common group chat app. Now I want to make it an individual chat app, which will have a Users list and when we select a ...
5
votes
2
answers
2k
views
How to redirect a user to a specific activity in Cloud Firestore?
While Registering an account using Firebase auth I stored emails in 2 categories Teacher and Student. I add emails to Firestore 2 different categories Teacher and Student with email and password. When ...
60
votes
18
answers
73k
views
How to catch a Firebase Auth specific exceptions
Using Firebase, how do I catch a specific exception and tell the user gracefully about it? E.g :
FirebaseAuthInvalidCredentialsException: The email address is badly
formatted.
I'm using the code ...
52
votes
3
answers
68k
views
Add extra User Information with firebase
I have integrated firebase auth with my android app. Lets say a user has a mail [email protected]. I want to add some extra information to the user like the name of the user, occupation and address. How can ...
28
votes
4
answers
21k
views
How to prevent simultaneous logins of the same user with Firebase?
I'd like for the new session to essentially "log out" of any previous session. For example, when you are in an authenticated session in one computer, starting a new session on another computer and ...
10
votes
1
answer
5k
views
How can handle separate login for two types of users in same firebase app?
I have a scenario and looking solution for that. I am working on an application and Using Firebase to create and authenticate the User. In my app, basically two types of users (1.User & 2. Vender) ...