Comments (12)
I'm unable to reproduce this. I am assuming you are talking about new email/password accounts. I signed up a couple of new users and logged out and then signed in again using the same accounts and the display name was intact.
from firebaseui-web.
Right now I have several users in this state.
I have log the first line in the callback:
firebase.auth().onAuthStateChanged(function(user) {
console.log(JSON.stringify(user));
and get:
{"displayName":null,"photoURL":null,"email":"sa...
Which I assume should be impossible to get...
Is there any way to see displayName information directly in firebase Auth console?
Is there any information I can share to help debug this?
from firebaseui-web.
Hi! Could you please file a ticket in https://firebase.google.com/support/contact/troubleshooting/ and include:
- A reference to this issue
- uids and full emails of the accounts affected
- Mention to route this to my name
That way we can take a look more efficiently and without you having to share information about your users publicly :)
from firebaseui-web.
Ok i am pretty certain I know what's going on.
During email/password sign up, the following steps occur:
- createUserWithEmailAndPassword will create the new account with the email and password.
- updateProfile is called on the currentUser
- firebaseui callback run or signInSuccessUrl redirected to.
You likely have an onAuthStateChanged listener setup where you do something like this:
var unsubscribe = firebase.auth().onAuthStateChanged(function(user) {
if (user) {
// Either user already signed in or in the middle of a sign in process.
// display signed in screen.
// This is interrupting step 2 and all users have no display name set.
// If you unsubscribe quickly after first call, this will not interrupt the update profile on second call.
} else {
// No signed in, render sign in widget.
ui.start(...);
}
// Unsubscribe after first trigger and rely on the signInSuccess callback to trigger to detect sign in completion reliably.
unsubscribe();
});
We are adding an isPending method to confirm the sign in process is still in progress:
#34
from firebaseui-web.
Hi @sruditsky,
This issue has been fixed as part of the new release. We found a way to avoid it without adding extra work for developer. Please see the release notes: https://github.com/firebase/firebaseui-web#050 and have a look at the demo app to see a new SPA example.
from firebaseui-web.
This issue is still the case. I'm trying to use firebase-ui-auth-1.0.0 in sample app and in my app, but displayName is null after Sign Up with Email provider. You need to sign out and sign in again to actually get the displayName. Is there a way to get it working?
from firebaseui-web.
You are probably describing a slightly different situation than (#36). I do not think that in the original problem "sign out/sign in" would helped.
Anyway, to deal with the original problem I was told to take into account that onAuthStateChanged may be called several times and
the times where user.displayName == null should be ignored.
From: vitnuk [email protected]
Sent: Sunday, November 13, 2016 6:41 AM
To: firebase/firebaseui-web
Cc: sruditsky; Mention
Subject: Re: [firebase/firebaseui-web] displayName is null after login in (#36)
This issue is still the case. I'm trying to use firebase-ui-auth-1.0.0 in sample app and in my app, but displayName is null after Sign Up with Email provider. You need to sign out and sign in again to actually get the displayName. Is there a way to get it working?
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/36#issuecomment-260180982, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIA435kQ-YoCYWQw-ujTEFMjSbITN7byks5q9vd_gaJpZM4Jjbq_.
from firebaseui-web.
As part of the 0.5.0 release, this issue should have been fixed. The onAuthStateChanged
should only be called at the end of the sign-in/sign-up flow, with the displayName
set. @vitnuk, let's track this potential new bug in the other issue you opened, #67.
@sruditsky, are you still observing that the observer is called several times during the sign-in/sign-up process with FirebaseUI?
from firebaseui-web.
No. I do not. Just tested this with the new version of FirebaseUI and I cannot reproduce it.
From: Thomas Césaré-Herriau [email protected]
Sent: Sunday, November 13, 2016 3:18 PM
To: firebase/firebaseui-web
Cc: sruditsky; Mention
Subject: Re: [firebase/firebaseui-web] displayName is null after login in (#36)
As part of the 0.5.0 release, this issue should have been fixed. The onAuthStateChanged should only be called at the end of the sign-in/sign-up flow, with the displayName set. @vitnukhttps://github.com/vitnuk, let's track this potential new bug in the other issue you opened, #67#67.
@sruditskyhttps://github.com/sruditsky, are you still observing that the observer is called several times during the sign-in/sign-up process with FirebaseUI?
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/36#issuecomment-260209592, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AIA436OBFHhSP9Fi1SDFrZIxBExAve3dks5q93CLgaJpZM4Jjbq_.
from firebaseui-web.
Great! Thanks for testing it.
from firebaseui-web.
hey @sruditsky have you found a solution yet? I am also facing the exact same problem...
EDIT
so sorry I didn't saw the issue was closed...I will ask my question in #67
from firebaseui-web.
If we register new user with email and password using createUserWithEmailAndPassword(email, password)
it only takes two arguments email
& password
from input and it does not save user name in firebase.
To fix this issue we have to update user name in firebase using updateProfile
method after user is registered. Check following example:
const res = await auth.createUserWithEmailAndPassword(email, password);
const user = res.user;
// once we get user object then update user display name using following method
await user.updateProfile({displayName: name})
See my detail answer on stackoverflow Update user display name
Check reference from firebase here: How to update user profile
from firebaseui-web.
Related Issues (20)
- How can I change github redirect_uri in firebase ui parameters? HOT 2
- Firebase Web UI does not work with Next JS 13.5 version onwards (i.e. 13.5.x) HOT 1
- MFA Issue - internal server error 500 HOT 1
- FirebaseUI doesn't work properly in chrome mobile randomly: 20s latency onAuthStateChanged event HOT 7
- Incorrect error message when password requirements not met HOT 3
- Support Firebase JS SDK v9 and v10 HOT 3
- Typescript error when trying to use an async function for signInSuccessWithAuthResult callback HOT 1
- FirebaseUI compatibility with modular SDK HOT 1
- App Check isn't compatible with firebaseUI email login HOT 6
- Impossible to initialize firebase analytics for web
- Twitter authorisation throws "The supplied auth credential is incorrect, malformed or has expired. (auth/invalid-credential)"
- Will this project continue in 2024? HOT 1
- ANONYMOUS USER PROVIDER IS NOT WORKING IN FIREBASE UI HOT 3
- Working FirebaseUI Package for React and Next.js HOT 5
- Facebook logins stopped working on Android devices HOT 6
- Seems like Microsoft login doesn't work properly anymore HOT 1
- Unable to sign-in as cross-site cookies are blocked HOT 3
- Safari does not work on MacOS. It does not work at all on iOS devices - nor Chrome, nor Safari in redirect mode. HOT 1
- Google Sign-in doesn't work when AppCheck is enabled
- Catch all errors from sign in - improvement for signInFailure HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firebaseui-web.