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

Handle promise from auth().signInWithPopup(provider) #3

Open
scharinger opened this issue Sep 25, 2017 · 1 comment
Open

Handle promise from auth().signInWithPopup(provider) #3

scharinger opened this issue Sep 25, 2017 · 1 comment

Comments

@scharinger
Copy link

scharinger commented Sep 25, 2017

Hi,

I'm trying to approve my app some so the user does not have to reload the page after signing in.

After you sign in with the method auth().signInWithPopup(provider) in row 15 in auth.js nothing happens as it seems the user (this.$store.getters['auth/getUser']) does not react. I think it is because of the promise returned from auth().signInWithPopup(provider) is not handled, but I'm not sure. What would you say?

EDIT: I think my issue lies somewhere else actually. The user property of auth does get set after login. But components computed using the user property don't react on it.

image

image

The computed users property is null because unauthorized users don't have read access, but if I reload the page after authenticated the users list is retrieved. So the question is, how do recompute all computed values after auth user is changed?

Best regards, Tim

@Granipouss
Copy link
Owner

Hi,

I think it is a reactivity issue, maybe we should use the vue.$set function as stated here : https://vuejs.org/v2/guide/reactivity.html

I hope it will solve your problem, tell me if I need to edit the code.

Best,

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