I have a Xamarin Android application with Google OneTap authentication configured. Until recently, it worked fine. But now sometimes an error android.gms.common.apis.apiexception: 10 occurs. When I try again, the login may be successful for some time, then again fail.
I do not reinstall the application between attempts, I do not change the SHA keys anywhere. However, the problem randomly appears and disappears. Moreover, everything can work on one phone, but not on the other at the same time.
Can you help what I could be doing wrong?
var oneTapClient = Identity.GetSignInClient(mainActivity);
var signInRequest = new BeginSignInRequest.Builder()
.SetGoogleIdTokenRequestOptions(
new BeginSignInRequest.GoogleIdTokenRequestOptions.Builder()
.SetSupported(true)
.SetServerClientId(mainActivity.GetString(Resource.String.default_web_client_id))
.Build())
.SetAutoSelectEnabled(true)
.Build();
var result = (BeginSignInResult)await oneTapClient.BeginSignIn(signInRequest);