PlatformException on signing in with Google on Supabase

158 views Asked by At

I followed this tutorial to authenticate a Flutter but I am getting the following error:

PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , 
null, null)
E/flutter (25496): #0      GoogleSignInApi.signIn (package:google_sign_in_android/src/messages.g.dart:221:7)
E/flutter (25496): <asynchronous suspension>
E/flutter (25496): #1      GoogleSignIn._callMethod (package:google_sign_in/google_sign_in.dart:278:30)
E/flutter (25496): <asynchronous suspension>
E/flutter (25496): #2      GoogleSignIn.signIn.isCanceled (package:google_sign_in/google_sign_in.dart:431:5)
E/flutter (25496): <asynchronous suspension>
E/flutter (25496): 

I have created the relevant credentials on Google Console, enabled Google Signin on Supabase and added comma seperated android and web client IDS to Authorized Client IDs (for Android, One Tap, and Chrome extensions).

On android/app/build.gradle, I have added:

...
android {
    ...
    defaultConfig {
        ...
        // We need an empty manifestPlaceholders for appauth to not throw an error
        manifestPlaceholders += [
                'appAuthRedirectScheme': ''
        ]
    }
}

How can this be fixed?

0

There are 0 answers