0

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!

1 Answers1

0

Your app is your app, not Google.

The question is really just about OAuth and the way it works. So I found great answer for you. Answer to your question In brief: you can't, once you log-in Google side is no longer in talk.

Community
  • 1
  • 1
pr0gramist
  • 8,305
  • 2
  • 36
  • 48