I'm having trouble signing users out from Firebase (not manually).
The app requires $signInWithPopup
to use it, and whenever user signs out of their google account, I need the firebase to log them out as well. I thought AngularFire's Auth.$onAuthStateChanged
was handling that but turns out I was wrong when I just tested it.
Is there a listener for this or I'm just missing something here? BTW I'm limited on server-side though as everything's coded on client-side, so I can't do a server-check to force an unauth()/$signOut().
If there's no such listener then how do we proceed? Do I have to enforce a manual $timeout
or do oauth resolve on every $stateChangeStart
?
As I'm typing this, I think it's best to approach this with google sign-in callbacks and do Firebase unauth()/$signout().
Let me know if I'm missing something anyways. Thanks!