When the application starts, I create an instance of GoogleSignInClient as follows:

GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(getString(R.string.server_client_id)) .requestEmail() .build(); mGoogleSignInClient = GoogleSignIn.getClient(this, gso); 

At the same time, the server_client_id lives on a string obtained via credentials.json when registering the application in Google account. I try to log in using the button:

 Intent signInIntent = mGoogleSignInClient.getSignInIntent(); startActivityForResult(signInIntent, RC_SIGN_IN); 

After selecting an account in authorization activity in onActivityResult, I get a Task and an account from it:

 Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data); GoogleSignInAccount account = task.getResult(ApiException.class); 

but calling the last line causes an ApiException with error code 10

    1 answer 1

    I will offer you a temporary solution to your problem.

    Go to https://console.developers.google.com/ in your project.

    In the OAuth 2.0 client IDs -> Web client (Auto-created for Google Sign-in) section, copy the Client ID and substitute it.

    At the moment I have a temporary solution to the problem. I have not yet found where I added correctly to FireBase

    And also look at https://stackoverflow.com/questions/50452779/developer-error-this-application-is-misconfigured-google-sign-in-on-firebase