supabase-flutter
supabase-flutter copied to clipboard
[web] SignOut from Google Oauth does not clear the last authenticated account
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:
- Login using Google OAuth:
await supabase.auth.signInWithOAuth(OAuthProvider.google); - Fill your google credentials;
- Sign out:
supabase.auth.signOut(scope: SignOutScope.local) - Login again:
await supabase.auth.signInWithOAuth(OAuthProvider.google); - 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
I think this is a duplicate of #1015 , because you have to sign out from the google package manually as well.
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
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