2

I follow the docs for authenticating users in Firebase with Google. I implemented it and it works fine. It is also said that if I need to sign-out, I need to use:

Firebase.auth.signOut()

Does this line also sign out from Google? When I last used such an authentication, I had to use:

googleSignInClient.signOut()

Is this not needed anymore?

b2m9
  • 591
  • 2
  • 9
Joan P.
  • 2,368
  • 6
  • 30
  • 63
  • 1
    No, Firebase Auth has no permissions to interact in any way with other auth providers. You only get the identify of the user from Google. – b2m9 Apr 08 '22 at 07:35
  • @b2m9 So what should I to sign out from Google? – Joan P. Apr 08 '22 at 07:51
  • I don't understand what you mean. What you should do to sign out from Google? Google. Not your app, your app doesn't care about Google nor does it know whether you're logged in to Google or not. – b2m9 Apr 08 '22 at 07:54
  • @b2m9 So you basically say that I only need to use `Firebase.auth.signOut()` and that's it? – Joan P. Apr 08 '22 at 09:23
  • `Firebase.auth.signOut` will sign you out from the Firebase session (basically your app). Your question is "Does Firebase.auth.signOut() sign out from Google too?" - the answer is no. Do you want to sign out of Google Play Services inside your app (Note: that's not your Google account per se)? Then use `GoogleSignInClient`, see answer below. – b2m9 Apr 08 '22 at 09:28

1 Answers1

0

Using Firebase Auth Firebase.auth.signOut() only Sign's you out of the APP Which Is Being Referenced By Firebase And Not Off Google Entirely.
However If You Use googleSignInClient.signOut() It Signs You Off from The account being referenced by GoogleSignIn/Play Services Inside The App, But It Too Doesnt Sign You Off From Google Entirely.

mrtechtroid
  • 658
  • 3
  • 14