Firebase 3/AngularFire 2 Auth question

172 views
Skip to first unread message

Bryan Strader

unread,
Jun 23, 2016, 5:30:25 PM6/23/16
to Firebase Google Group
I am upgrading to firebase 3 and AngularFire 2 and I have a question about authentication. I am now using the firebase.auth().signInWithEmailAndPassword(u, p) way of authenticating which seems to work, but now all my queries are permission denied. How to I tell my firebase.database().ref() calls that I am logged in? Do I need to use $firebaseAuth(firebase.auth());?

Any help would be gladly appreciated

Kato Richardson

unread,
Jun 27, 2016, 12:16:59 PM6/27/16
to Firebase Google Group
Hi Bryan,

You'll want to wait until your auth is completed before initializing your observables. Check out AngularFire's (i.e. legacy version's) guide on routing. This seems to be the most elegant approach--make sure authentication is completed before the services/controllers syncing your auth-only data are accessed.

☼, Kato

On Thu, Jun 23, 2016 at 11:44 AM, Bryan Strader <bps...@gmail.com> wrote:
I am upgrading to firebase 3 and AngularFire 2 and I have a question about authentication. I am now using the firebase.auth().signInWithEmailAndPassword(u, p) way of authenticating which seems to work, but now all my queries are permission denied. How to I tell my firebase.database().ref() calls that I am logged in? Do I need to use $firebaseAuth(firebase.auth());?

Any help would be gladly appreciated

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/c5bee6e5-593e-4dd3-99e6-b3b68d5fc916%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages