-
-
Notifications
You must be signed in to change notification settings - Fork 335
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
Auth examples #47
Comments
I would try making user a computed property. Also maybe test I'm having success so far with auth and vuefire. If you're still stuck after the above I can make a Plnkr or something. I start .auth() in |
Hey @chrisbraddock I've gotten it to work so far. Now I'm stuck with another problem of needing the |
Ooh haha yeah I'm in the midst of a refactor on that very thing right now. Basically, any refs that need a user I'm waiting for Once you get the event you can $vm.$bindAsArray or $bindAsObject manually. See vuefire.js $bindAsArray and ultimately vue/src/core/observer/index.js defineReactive(). Depending on what you're doing, data fetching before navigation might be worth looking at, assuming you're using vue-router. BTW, you say 'before rendering the UI'. I read that in the context of the problem I'm in the middle of. Do you mean, you're unable to setup the Firebase reference(s) for a particular component because the user |
I've looked into the Yes that's what I mean. I'm using Example:
|
see if this helps: https://github.com/chrisbraddock/vuefire-auth-demo |
Thanks! I couldn't find where we were chatting back and forth for some reason >.< That was helpful, especially now I know how to use |
I was able to swap vuefire for vuexfire really easily. I'm testing that as a full blown solution now. |
Ah sweet! This is exactly what I'm attempting to do now. I got it workout without modules, but I feel like I may need them. Fyi, I'm on https://gitter.im/vuejs/vue |
Hey I know that this is closed and Chris thanks for the Auth example but did any of you happen to get this working in components? I'm importing a firebase function in every component so doing a bunch of Thanks! |
@NickolasBoyer, sorry for the late reply. You might check out Vuex and Vuexfire. Assuming the state you're talking about needing "in every component" is shared state, Vuex is a good place to house that, and getting that data in to components is simple using Vuex mapState and mapGetters. |
Hi there,
I'm having trouble getting auth to work. I have successfully implemented the ability to create and login to an account, but I'm having trouble getting the
currentUser
with the functiononAuthStateChanged
.Does anyone have any Vue 2.0, vue-router, and Firebase 3+ examples of auth successfully implemented that would steer me in the right direction?
/views/Auth.vue
AppNav always reports unknown
user.title
after I am logged in./components/AppNav.vue
The text was updated successfully, but these errors were encountered: