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

Reconnecting to firebase after signin. #48

Closed
prenna opened this issue Nov 19, 2016 · 4 comments
Closed

Reconnecting to firebase after signin. #48

prenna opened this issue Nov 19, 2016 · 4 comments
Labels

Comments

@prenna
Copy link

prenna commented Nov 19, 2016

I am having signin and diplay of data in the same file.

Obviously the user cannot retrieve data when they are not signed in.
After a user is authenticated, how do I tell vue to refresh the firebase refs when the authentication state is changed without refreshing the page?

@prenna
Copy link
Author

prenna commented Nov 19, 2016

I just read through the readme again...

I think if I do manual bindings in my onAuthStateChanged callback this will solve my issue.

@posva
Copy link
Member

posva commented Nov 19, 2016

Yes, you can do it that way although I'd recommend you to separate the views/partial views where the user has to be authenticated so you can decide not to display them when the user is not logged in yet

@posva posva closed this as completed Nov 19, 2016
@posva posva added the question label Nov 19, 2016
@prenna
Copy link
Author

prenna commented Nov 19, 2016

It worked... and I already thought of that, I am using v-if to display certain ui components dependent on whether a user is signed in or not.

@posva
Copy link
Member

posva commented Nov 19, 2016

I mean that having the auth logic at a router level is better. Using v-ifs may not be the best solution

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

2 participants