I'm developing an App with FLutter + Parse Server (back4app), I crashed the part of making the login system through google, I'm using the following function:
Future<void> _signUpGoogle() async{
loading = true;
final GoogleSignIn _googleSignIn = GoogleSignIn( scopes: ['email', 'https://www.googleapis.com/auth/contacts.readonly'] );
sigInGoogle() async {
GoogleSignInAccount account = await _googleSignIn.signIn();
GoogleSignInAuthentication authentication = await account.authentication;
final ParseResponse response = await ParseUser.loginWith(
'google',
google(_googleSignIn.currentUser.id,
authentication.accessToken.toString(),
authentication.idToken
));
if(response.success){
print(response.success);
}else{
print(google(_googleSignIn.currentUser.id,
authentication.accessToken.toString(),
authentication.idToken
));
}
}
sigInGoogle();
}
```[Google configs][1]
this is returning the following error to me:
╭-- Parse Response I/flutter (28974): Class: _User I/flutter (28974): Function: ParseApiRQ.loginWith I/flutter (28974): Status Code: 101 I/flutter (28974): Type: ObjectNotFound I/flutter (28974): Exception: Google auth is invalid for this user.
[Authorized domains][2]
Can anyone help me solve this error?
[1]: https://i.stack.imgur.com/cfJC1.png
[2]: https://i.stack.imgur.com/zmrJp.png