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

sessionService.data.authenticated.user.providerData Not Updating #585

Open
MatthewPringle opened this issue Jul 2, 2019 · 4 comments
Open

Comments

@MatthewPringle
Copy link

MatthewPringle commented Jul 2, 2019

sessionService.data.authenticated.user.providerData doesn't update when I add other providers.

If I log the session.data.authenticated.user object I can see it is updated, but Ember never sees the update and no computed properties update.

session: service(),

user: computed.readOnly( 'session.data.authenticated.user' ),

hasFacebook: computed.filterBy( 'user.providerData' , 'providerId' , 'facebook.com' ),

hasGoogle: computed.filterBy( 'user.providerData' , 'providerId' , 'google.com' ),

hasTwitter: computed.filterBy( 'user.providerData' , 'providerId' , 'twitter.com' ),
@MatthewPringle MatthewPringle changed the title sessionService.data.authenticated.user.providerData sessionService.data.authenticated.user.providerData Not Updating Jul 2, 2019
@jamesdaniels
Copy link
Contributor

Interesting, I'll take a peek. Thanks for the report.

@MatthewPringle
Copy link
Author

I think I have encountered issues like this before and from memory it was because the arrays were not converted to Ember Arrays.

Anyway if you need a working demo I am happy to share my repo with you.

@MatthewPringle
Copy link
Author

Seems to be other properties are not updating either.

Changing the displayName doesn't update the current name rendered in the template as in the provided example in the guide

firebase.auth().currentUser.updateProfile({ displayName: name })

@jamesdaniels
Copy link
Contributor

It's probably due to the auth token not being refreshed by default after a profile update. That is a manual step right now. Feel free to play around and I'll take a look at some point too,

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

No branches or pull requests

2 participants