supabase-flutter icon indicating copy to clipboard operation
supabase-flutter copied to clipboard

[web] SignOut from Google Oauth does not clear the last authenticated account

Open davidsdearaujo opened this issue 11 months ago • 2 comments

Describe the bug After sign out from a Google Account and try to login with another Google account it authenticates with the last account and don't allow the user to select another one.

To Reproduce Steps to reproduce the behavior:

  1. Login using Google OAuth: await supabase.auth.signInWithOAuth(OAuthProvider.google);
  2. Fill your google credentials;
  3. Sign out: supabase.auth.signOut(scope: SignOutScope.local)
  4. Login again: await supabase.auth.signInWithOAuth(OAuthProvider.google);
  5. The google authentication form is skipped and you are automatically logged in with the last account

Expected behavior The user should have the ability to login with another account. After you logout from a Google Account and try to login again you should be asked to fill the Google credentials again;

Version (please complete the following information):

├── supabase_flutter 2.8.1
│   ├── supabase 2.6.0
│   │   ├── functions_client 2.4.0
│   │   ├── gotrue 2.11.0
│   │   ├── postgrest 2.4.0
│   │   ├── realtime_client 2.4.0
│   │   ├── storage_client 2.2.0

davidsdearaujo avatar Dec 20 '24 13:12 davidsdearaujo

I think this is a duplicate of #1015 , because you have to sign out from the google package manually as well.

Vinzent03 avatar Dec 22 '24 22:12 Vinzent03

I called .signOut() from google_sign_in and it didn't resolve the problem (I'm not using supabase_auth_ui, only supabase_flutter).

Platform: web

davidsdearaujo avatar Dec 28 '24 11:12 davidsdearaujo

Specifying queryParams helped me get passed this issue. https://stackoverflow.com/questions/77141752/using-google-oauth-with-supabase-cant-login-with-different-account https://developers.google.com/identity/openid-connect/openid-connect#authenticationuriparameters

mash-g avatar Jul 07 '25 16:07 mash-g