Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If signed in with Google provider, signOut does not sign out of the provider #78

Open
stevebread opened this issue Mar 14, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@stevebread
Copy link

Bug report

Describe the bug

When signed in with Google as the provider on an Android device, signOut() ends the Supabase session but does not log out from the provider as well.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

Sign in setup

SupaSocialsAuth(
	socialProviders: const [OAuthProvider.google],
	nativeGoogleAuthConfig: const NativeGoogleAuthConfig(webClientId: '...'),
	onSuccess: (Session session) {},
)

Sign out action
Supabase.instance.client.auth.signOut()

  1. On first sign-in on an Android device, an account chooser is displayed
  2. Select an account from the list and login
  3. Sign out and return to the login screen
  4. Sign in again. This time the login completes without presenting the account chooser

Expected behavior

On sign-in after a sign-out, the account chooser should be displayed again.

System information

  • OS: Android 14
  • supabase_auth_ui: 0.4.3
@stevebread stevebread added the bug Something isn't working label Mar 14, 2024
@FatumaA
Copy link
Collaborator

FatumaA commented Apr 17, 2024

Isn't this typical behaviour?

@stevebread
Copy link
Author

I'm coming from Firebase so I'll compare to that.
FirebaseAuth.instance.signOut() terminates the Firebase session but does not log out of the provider on the device, same as what is currently possible with Supabase.
The firebase_ui_auth API has FirebaseUIAuth.signOut() which also signs out of the provider. I would like to see an equivalent of that in this package.

@FatumaA
Copy link
Collaborator

FatumaA commented May 13, 2024

@dshukertjr thoughts?

@dshukertjr
Copy link
Member

Sure, seems like a fair feature to have 👍

@pidanou
Copy link

pidanou commented Aug 23, 2024

I have the same issue, i added this to fix it:

                onTap: () async {
                  await Supabase.instance.client.auth.signOut().then((value) {
                    _googleSignIn.signOut();
                    GoRouter.of(context).go('/login');
                  });
                },

But yea it seems more logical to have a provider sign out when using signOut

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants