I have been making an app for android and testing the google login worked fine when I used the emulator and on my phone directly. However, when I "generate a signed bundle/apk" and install the app on my same phone or any other phone, I get the following error:
D/~google~: signInResult:failed code=10
It's happening in this method:
private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {
try {
GoogleSignInAccount account = completedTask.getResult(ApiException.class);
// Signed in successfully, show authenticated UI.
Log.d("~google~","successful google login");
isLoginSuccessful = true;
firebaseAuthWithGoogle(account.getIdToken());
} catch (ApiException e) {
// The ApiException status code indicates the detailed failure reason.
// Please refer to the GoogleSignInStatusCodes class reference for more information.
Log.d("~google~", "signInResult:failed code=" + e.getStatusCode());
}
}
I have searched for this answer, but I have not come across a consistent solution, specific to the behavior I'm observing.





