Describe the bug
ID token is null after calling signIn() from google_sign_in which means that I am not able to use the method signInWithIdToken() from supabase_flutter.
To Reproduce
Steps to reproduce the behavior:
Set up google as your provider (set up the oauth client in GCP and then provide the client id and secret in the supabase dashboard)
In a flutter web project, run the following snippet:
final googleSignIn = GoogleSignIn(
scopes: [
'email',
],
);
final signInAccount = await googleSignIn.signIn();
log(googleSignIn.currentUser.toString());
if (signInAccount == null) throw 'Something went wrong!';
final googleAuth = await signInAccount.authentication;
log(googleAuth.accessToken.toString());
log(googleAuth.idToken.toString());
Check the debug console and you will notice that the ID token is logged out as null. This only happens on web.
Expected behavior
As in iOS and android, I should get the ID token.
Additional context
I have done some research and it appears that this is expected behaviour on web. Please check out the google_sign_in and google_sign_in_web package page in pub.dev. It clearly says that due to the migration to the new GIS SDK, ID token will always be null.
The confusion, however, is that my project's google auth worked flawlessly with Firebase. I only encountered this issue after I tried moving to Supabase.
Describe the bug ID token is null after calling
signIn()
fromgoogle_sign_in
which means that I am not able to use the methodsignInWithIdToken()
fromsupabase_flutter
.To Reproduce Steps to reproduce the behavior:
In a flutter web project, run the following snippet:
Check the debug console and you will notice that the ID token is logged out as null. This only happens on web.
Expected behavior As in iOS and android, I should get the ID token.
Version (please complete the following information): ├── supabase_flutter 2.3.3 │ ├── supabase 2.0.7 │ │ ├── functions_client 2.0.0 │ │ ├── gotrue 2.5.0 │ │ ├── postgrest 2.1.0 │ │ ├── realtime_client 2.0.0 │ │ ├── storage_client 2.0.1
Additional context I have done some research and it appears that this is expected behaviour on web. Please check out the google_sign_in and google_sign_in_web package page in pub.dev. It clearly says that due to the migration to the new GIS SDK, ID token will always be null. The confusion, however, is that my project's google auth worked flawlessly with Firebase. I only encountered this issue after I tried moving to Supabase.