firebase-authentication

Firebase javascript auth user displaying null even though user is signed in

老子叫甜甜 提交于 2020-06-28 04:26:58
问题 I followed the Firebase docs for web development and I used the user.updateProfile method to add a display name to the user's profile. After signing in, I used console.log(user) and it worked but when I call updateProfile() , the value of user is null. Any solutions? Here is the relevant code: var button = document.getElementById("profile-button"); var username = document.getElementById("username-Box").value; var user = firebase.auth().currentUser; auth.onAuthStateChanged(user =>{ console.log

call method createUserWithEmailAndPassword without doing signIn

眉间皱痕 提交于 2020-06-27 17:30:08
问题 In my system I need to create users from an authenticated user, but for this I need to create a user through the createUserWithEmailAndPassword method and when I create the user through this method the authentication status changes to the user that was created at the moment. Is there a way to create users from an authenticated user without making signIn for the user created after it was created by the createUserWithEmailAndPassword method? I have a system developed in Angular + Node.js

Firebase AUTH won't stay logged in

删除回忆录丶 提交于 2020-06-27 06:11:55
问题 When I log into a firebase app using signInWithEmailAndPassword(email, password) , the user is logged in. Then, if I reload the page, the user is no longer logged in. If I go to another webpage with the same firebase apiKey and everything, the user still isn't logged in. How would I go about making sure the user stays logged in until firebase.auth().signOut() is called? 回答1: Simply using firebase.auth().currentUser usually won't work because when that's loaded, Firebase usually hasn't

Firebase PhoneAuth with Real phone Number Is Not Working But Whitelisted Number is Working - Android

生来就可爱ヽ(ⅴ<●) 提交于 2020-06-26 05:54:38
问题 I am setting up Firebase Phone Auth in My App. I set up a Test Phone Number and a verification code in firebase auth section Whitelist. When I test with this Number and code, it's working. But When I Test With another number I got the Following error : onVerificationFailed com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The request contains malformed or mismatching credentials [ App ID does not match the requested project. side note: I also use facebook account kit in this

Firebase PhoneAuth with Real phone Number Is Not Working But Whitelisted Number is Working - Android

╄→尐↘猪︶ㄣ 提交于 2020-06-26 05:50:13
问题 I am setting up Firebase Phone Auth in My App. I set up a Test Phone Number and a verification code in firebase auth section Whitelist. When I test with this Number and code, it's working. But When I Test With another number I got the Following error : onVerificationFailed com.google.firebase.auth.FirebaseAuthInvalidCredentialsException: The request contains malformed or mismatching credentials [ App ID does not match the requested project. side note: I also use facebook account kit in this

Is there a way to determine if a Firebase user's UID is valid?

让人想犯罪 __ 提交于 2020-06-26 04:34:08
问题 I am building a server route that I wish to restrict for use only by authenticated users. I plan to send a user.uid with a POST to this route, and I want to validate the UID is one that exists in Firebase. I know I can add UIDs manually in Firebase and check against this data, but is it possible to see what UIDs Firebase authentication is tracking? I think this approach would be better then checking against my own list. The purpose for this is to ensure that these routes are not accessed with

How to store user data using Firebase in Android?

蹲街弑〆低调 提交于 2020-06-25 06:48:23
问题 I need to create and use a database entry with all details (uid, name etc) for each user that logs in to the application I am having trouble storing user data in order to use and retrieve user profile info using Firebase in Android. I found this documentation on the old version of Firebase but this does not seem to work any longer. Does anyone know how to reproduce the above code so it works with the new version of Firebase? Many thanks in advance. Edit - code below: final Firebase ref = new

Firebase Allowing Multiple Accounts from Same Email Address

不问归期 提交于 2020-06-24 08:17:06
问题 Within the Firebase console I have specifically set it to only allow "One account per email address". This is found on the sign-in method tab under "advanced". I have an account created using the Google login method that has an address like "me@gmail.com". If I then choose to sign-in via Facebook using an account that also uses "me@gmail.com", Firebase is allowing it with the exception that the email address in the Users entity is null. The Firebase documentation states: if you don't allow

Persist user Auth Flutter Firebase

核能气质少年 提交于 2020-06-22 09:47:08
问题 I am using Firebase Auth with google sign in Flutter. I am able to sign in however when I close the app(kill it), I have to sign up all over again. So is there a way to persist user authentication till specifically logged out by the user? Here is my auth class import 'package:firebase_auth/firebase_auth.dart'; import 'package:google_sign_in/google_sign_in.dart'; class Auth { FirebaseAuth _firebaseAuth; FirebaseUser _user; Auth() { this._firebaseAuth = FirebaseAuth.instance; } Future<bool>

Persist user Auth Flutter Firebase

微笑、不失礼 提交于 2020-06-22 09:47:06
问题 I am using Firebase Auth with google sign in Flutter. I am able to sign in however when I close the app(kill it), I have to sign up all over again. So is there a way to persist user authentication till specifically logged out by the user? Here is my auth class import 'package:firebase_auth/firebase_auth.dart'; import 'package:google_sign_in/google_sign_in.dart'; class Auth { FirebaseAuth _firebaseAuth; FirebaseUser _user; Auth() { this._firebaseAuth = FirebaseAuth.instance; } Future<bool>