Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display name property updating when updating the user profile email/password type users #217

Closed
handihow opened this issue Apr 2, 2019 · 4 comments
Assignees
Labels

Comments

@handihow
Copy link

handihow commented Apr 2, 2019

Below is true only for email/password type users. It seems to work properly for social login users...

When updating the user's profile, the "Name" field in the form does not get automatically filled with the "displayName" property saved in Firebase.

Also there is an error and the form does not appear nicely.
The console displays: "ERROR TypeError: Cannot read property 'length' of null" on UserComponent.html: 55.

@Faisalnwz01
Copy link

Seeing the same issue when I try to edit displayName

@AnthonyNahas
Copy link
Owner

I will inspect the code tonight👍

@AnthonyNahas AnthonyNahas self-assigned this Apr 10, 2019
@AnthonyNahas AnthonyNahas removed the bug label Apr 10, 2019
@AnthonyNahas
Copy link
Owner

AnthonyNahas commented Apr 10, 2019

@handihow how are you updating the user's profile ?

I assume that you changed the values of the user's profile directly via firestore...

Those values actually are related directly to the firebase authentication system.

That means, I sync the firebase auth system with firestore and not vice versa.

In other words, you can only update the user profile (firebase auth system) via the ngx-auth-firebaseui-user component and than the profile will be updated in firestore.

To prevent updating the profile directly from firestore, I should now solve this issue #216

Regarding ERROR TypeError: Cannot read property 'length' of null" on is now fixed

I hope that was helpful 🍻

@handihow
Copy link
Author

@AnthonyNahas thanks for the clarification and the update of the code!

Also updated my code and now everything is working like a charm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants