Giter VIP home page Giter VIP logo

Comments (12)

bojeil-google avatar bojeil-google commented on August 14, 2024

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.

sruditsky avatar sruditsky commented on August 14, 2024

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.

alfongj avatar alfongj commented on August 14, 2024

Hi! Could you please file a ticket in https://firebase.google.com/support/contact/troubleshooting/ and include:

  1. A reference to this issue
  2. uids and full emails of the accounts affected
  3. 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.

bojeil-google avatar bojeil-google commented on August 14, 2024

Ok i am pretty certain I know what's going on.
During email/password sign up, the following steps occur:

  1. createUserWithEmailAndPassword will create the new account with the email and password.
  2. updateProfile is called on the currentUser
  3. 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.

TMSCH avatar TMSCH commented on August 14, 2024

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.

vitnuk avatar vitnuk commented on August 14, 2024

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.

sruditsky avatar sruditsky commented on August 14, 2024

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.

TMSCH avatar TMSCH commented on August 14, 2024

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.

sruditsky avatar sruditsky commented on August 14, 2024

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.

TMSCH avatar TMSCH commented on August 14, 2024

Great! Thanks for testing it.

from firebaseui-web.

Akshit94 avatar Akshit94 commented on August 14, 2024

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.

ampyard-akshay-sushir avatar ampyard-akshay-sushir commented on August 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.