i was created OAuth consent screen and Credentials in console.cloud.google.com
it's my flutter code
GoogleSignIn _googleSignIn = GoogleSignIn(
clientId: 'xxxx from console.cloud.google.com',
scopes: [
'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile'
]
);
and
Future<void> _handleSignIn() async {
try {
await _googleSignIn.signIn();
print('ok');
} catch (error) {
print(error);
}
}
but i got this error
PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null, null)
thanks for your help
CodePudding user response:
Run keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
to get your SHA-1 and SHA-256. If you are signing in with firebase, add these SHA codes to your firebase project settings.
CodePudding user response:
Are you sure you're using the right client ID with the right device ? If you're running flutter on IOS for example, you need an iOS google client ID to make google sign in work.