Questions tagged [firebase-authentication]
Firebase Authentication provides backend services, easy-to-use SDKs, and ready-made UI libraries to authenticate users to your app.
22,434
questions
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 ...
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 ...
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 ...
169
votes
7
answers
91k
views
Where does one set the Oauth Redirect URI for Facebook apps?
We are being asked to set the OAuth redirect URI for Facebook (as shown below) in the instructions to set up Google Firebase to use Facebook login.
We clicked in every menu for our app. Where is it? ...
165
votes
15
answers
219k
views
How do I detect if a user is already logged in Firebase?
I'm using the firebase node api in my javascript files for Google login.
firebase.initializeApp(config);
let provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithPopup(...
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
...
153
votes
31
answers
169k
views
Could not find a valid GoogleService-Info.plist in your project
When I run my swift 3.2 code with Xcode 9 beta 4 this is the error I get:
*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure]; (FirebaseApp.configure() in ...
122
votes
7
answers
46k
views
How to create "credential" object needed by Firebase web user.reauthenticateWithCredential() method?
The (unclear) example in the new docs:
var user = firebase.auth().currentUser;
var credential;
// Prompt the user to re-provide their sign-in credentials
user.reauthenticateWithCredential(credential)....
119
votes
15
answers
137k
views
Firebase 3 - We have blocked all requests from this device due to unusual activity
I was testing my login/sign up feature and for some reason I can't understand Firebase now is blocking all requests from my device.
I've waited one day to try again, but I still have the same problem....
105
votes
13
answers
88k
views
FirebaseInstanceId Token retrieval failed SERVICE_NOT_AVAILABLE
I'm working on an android app, it uses Firebase Authentication, Database and Storage. It was all working fine until this error message started to show up in logcat. (I did not tamper with any configs ...
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 ...
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....
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....
90
votes
2
answers
100k
views
Where can I get "serviceAccountCredentials.json" for Firebase Admin?
Here is said what I need to set up Firebase on java:
FirebaseOptions options = new FirebaseOptions.Builder()
.setDatabaseUrl("https://databaseName.firebaseio.com")
.setServiceAccount(...
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, ...
86
votes
37
answers
56k
views
Delete all users from firebase auth console
Is there an easy way to delete all registered users from firebase console?
For example, I created a hundred users from my development environment, and now I want to delete all of them.
82
votes
5
answers
209k
views
How to solve Warning: React does not recognize the X prop on a DOM element
I'm using a thing called react-firebase-js to handle firebase auth, but my understanding of react and of the provider-consumer idea is limited.
I started with a built a very big JSX thing all at ...
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 ...
74
votes
8
answers
59k
views
Firebase confirmation email not being sent
I've set up Firebase email/password authentication successfully, but for security reasons I want the user to confirm her/his email.
It says on Firebases website:
When a user signs up using an email ...
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
...
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, ...
71
votes
2
answers
45k
views
Firebase stop listening onAuthStateChanged
As of version ^3.0.0, I'm having a difficult time removing the auth state change listener.
To start the listener per the documentation:
firebase.auth().onAuthStateChanged(function (user) {
// ...
70
votes
9
answers
104k
views
Using Interceptor in Dio for Flutter to Refresh Token
I am trying to use Interceptor with Dio in flutter, I have to handle Token expire.
following is my code
Future<Dio> getApiClient() async {
token = await storage.read(key: USER_TOKEN);
...
70
votes
17
answers
109k
views
Class file for com.google.android.gms.internal.zzaja not found
I am using Fragment for the designing of the Firebase simple login registration.
I get error in the OnCreateView() method on initializing
auth = FirebaseAuth.getInstance();
error:- Error:(58, 28) ...
70
votes
6
answers
44k
views
Firebase authentication vs AWS Cognito [closed]
We are building a mobile and web app on AWS using API Gateway and Lambda and are currently evaluating if we should use AWS Cognito or Firebase Auth.
AWS Cognito integrates nicely into API Gateway and ...
70
votes
5
answers
31k
views
What happens to Firebase anonymous users?
I want to know what will happen to the users of my app that I used anonymous sign in method for them.
The Firebase documentation is really BAD and didn't explain everything and expect developer to ...
69
votes
12
answers
47k
views
Check if user is authenticated for the first time in Firebase Google Authentication in Android
I am using Firebase Authentication in an Android application, and I am using Google account authentication as an option to sign in to the application.
How can I know if the user is signed in to the ...
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 ...
67
votes
8
answers
53k
views
Firebase (Phone Auth) Getting iOS error: register custom URL scheme
My flutter app uses Firebase Auth (Phone). I keep seeing the error: 'Please register custom URL scheme 'com.googleusercontent.apps.602546125958-5lk04ghhdfj5xxxxxxxx'.
I have added the URL schema to ...
66
votes
13
answers
49k
views
App crashing when using Firebase Auth, reason: 'Default app has already been configured.'
I'm building my first iOS application, and I am using Firebase to handle authentication, database, etc. I added a sign up screen and used the following code to create a new user:
FIRAuth.auth()?....
66
votes
9
answers
55k
views
Firebase Auth/unauthorized domain. Domain is not authorized
I am trying to run this sample firebase project, but I keep getting this error in the browser console.
Lf {code: "auth/unauthorized-domain", message: "This domain (mail-demo-fcm.firebaseapp.com) is ...
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.
...
65
votes
7
answers
62k
views
Cross-Origin-Opener-Policy policy would block the window.closed call error while using google auth
I am using firebase and its google auth tool , everything works fine the user data is getting saved in the database but i get a error every time the popup window appears (Cross-Origin-Opener-Policy ...
63
votes
6
answers
37k
views
Node.js -Firebase Service Account Private Key won't parse
I use .env variables in my app.js file to access the keys. Everything was working fine until I downloaded a new Firebase Service Account Private Key. When I replaced the old value with the new value I ...
63
votes
9
answers
82k
views
How to change email in firebase auth?
I am trying to change/update a user's email address using :
firebase.auth().changeEmail({oldEmail, newEmail, password}, cb)
But I am getting ...changeEmail is not a function error. I found the ...
61
votes
9
answers
29k
views
Authentication using Facebook at first and then Google causes an error in Firebase for Android
As I understand from the Firebase Docs, if a user authenticates his account with a credential, he should strictly login by using the same credential if the credential is not linked with another one ...
61
votes
1
answer
33k
views
What is the difference between Firebase auth and Auth0 authentication
How does http://auth0.com's authentication features compare to Firebase's authentication?
Does Auth0.com, on the Free or Silver plan, provide any authentication features that Firebase does not ...
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 ...
58
votes
6
answers
15k
views
Firebase Android onAuthStateChanged called twice
I've start working with new Firebase SDK.
When I'm doing user login, I'm onAuthStateChanged method is being called twice with same state (etc. user sign in).
I'm sure I'm adding the ...
57
votes
7
answers
178k
views
Is there any way to get Firebase Auth User UID?
I am looking to fetch Auth User(s) UID from Firebase via NodeJS or JavaScript API.
I have attached screenshot for it so that you will have idea what I am looking for.
Hope you can help me out with ...
56
votes
3
answers
45k
views
Firebase - Customize reset password landing page
Can I customize the landing page of password reset in Firebase. I want to localize that page since my app is not in english. Is there any way to do so?
Thanks in advance.
56
votes
9
answers
84k
views
How to Signout a user in Flutter with Firebase authentication
I have a problem signing out the current user from my app
the method I am using is as follows:
....
onPressed:_signOut
//jump to function
void _signOut() {
FirebaseAuth.instance.signOut();
...
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 ...
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 ...
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 ...
55
votes
8
answers
35k
views
Error: Firebase ID token has expired
On my server I'm seeing these errors when using firebase admin sdk .verifyIdToken()
Firebase ID token has expired. Get a fresh token from your client app and try again
Firebase ID token has "kid&...
54
votes
5
answers
34k
views
Using mail and password to authenticate via the REST API [Firebase]
I was wondering whether it is possible to actually authenticate to the Firebase REST API withouth using the custom authentication?
I've worked with Firebase now for some time and I'm currently ...