During google sign in I am getting the status code 12501
@Override
public void onActivityResult(final SignInView loginView, int requestCode, int resultCode, Intent data) {
if (requestCode == Constants.RC_SIGN_IN) {
result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);
Log.d(TAG, "Status code " + result.getStatus().getStatusCode());
final GoogleSignInAccount acct = result.getSignInAccount();
if (resultCode == GoogleSignInStatusCodes.SUCCESS || resultCode == GoogleSignInStatusCodes.SUCCESS_CACHE) {
if (acct != null) {
new AsyncTask<Void, Void, Void>() {
@Override
protected Void doInBackground(Void... params) {
googleToken = getGoogleToken();
SignUpViewModel signUpViewModel = new SignUpViewModel.Builder()
.fullName(acct.getDisplayName())
.login(acct.getEmail())
.accessToken(googleToken)
.socialIDP(Constants.GOOGLE_SOCIAL_SOURCE)
.build();
fieldLoginView.onSuccessFetchToken(signUpViewModel);
return null;
}
}.execute();
}
} else if (resultCode == GoogleSignInStatusCodes.SIGN_IN_CANCELLED) {
fieldLoginView.onErrorSignin(fieldLoginView.getContext().getString(R.string
.ss_err_13_fb_user_cancelled));
} else {
String message = GoogleSignInStatusCodes.getStatusCodeString(resultCode);
if (!TextUtils.isEmpty(message)) {
fieldLoginView.onErrorSignin(message);
} else
fieldLoginView.onErrorSignin(fieldLoginView.getContext().getString(R.string
.ss_err_13_fb_user_cancelled));
}
}
}
I have gone through the below links multiple times and check each steps multiple times, but all in vain.
Error 12501 authenticating with google sign-in
Here if I am using the google-service.JSON downloaded from my own account(test account, my local system's fingerprint is configured) its working fine. But if I am using the developer account(an account existing previously in which plus API was integrated) it's not working.
Feel free to ask more details. I am struggling with this issue from last 4-5 days:( .