signOut() method dont work with a session opened with oauth google provider on supabase with flutter

49 views Asked by At

Im trying signout with method auth.signOut() with a session of google signin with method signInWithOAuth() but the session after a hot restart stay opened with google provider

Method signin

  Future authenticationUserWithGoogleFromApi() async {
try {
  final response = await clientSupabase.auth.signInWithOAuth(
    Provider.google,
    redirectTo: SupabaseCredentials.myAuthRedirectUri,
  );
  return response;
} on Failure catch (e) {
  throw Failure(e.message);
}

}

signout metohd

  Future signOutFromApi() async {
try {
  await clientSupabase.auth.signOut();
} on AuthException catch (e) {
  throw Failure(e.toString());
}

}

0

There are 0 answers