title: Google sign in failed com.google.android.gms.common.api.ApiException: 10:
body: <p>So I'm Stuck on this frustrating issue.
  I am quite new to Google Auth on Firebase but I done everything the firebase docs instructed in how to integrate the Google SignIn Auth, yet I'm still receiving this weird Error in the console consisted of two parts:</p>
  
  <pre><code>12-03 11:07:40.090 2574-3478/com.google.android.gms E/TokenRequestor: You have wrong OAuth2 related configurations, please check. Detailed error: UNREGISTERED_ON_API_CONSOLE
  </code></pre>
  
  <p>and also</p>
  
  <pre><code>Google sign in failed com.google.android.gms.common.api.ApiException: 10:
  </code></pre>
  
  <p><strong>Before Anyone attempts to point out similar questions that have previously been asked on stack overflow, Here's what I have done till now after seen all the available solutions and yet non has resolved the error</strong></p>
  
  <ul>
  <li>I have my SHA1 fingerprint for my project</li>
  <li>I have my OAuth 2.0 client ID, both, the android client id and the web client and in the requestIdToken() I have put the <strong>web client id</strong>.</li>
  <li>I did <strong>not</strong> publish my project's APK on google play store. which means I did not accidentally generate another SHA1 fingerprint.</li>
  <li>I have followed step by step the Google Sign in Auth firebase docs.</li>
  </ul>
  
  <p>here is my code snippet:</p>
  
  <pre><code>@Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_signup);
      ButterKnife.bind(this);
  
      String webClientId = getString(R.string.web_client_id);
  
  
      GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
              .requestEmail()
              .requestIdToken(webClientId)
              .build();
  
      mGoogleApiClient = new GoogleApiClient.Builder(this)
              .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
              .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
              .build();
  
      mGoogleSignInClient = GoogleSignIn.getClient(this, gso);
  
  
      GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);
  
  
      googleLoginBtn.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Intent signInIntent = mGoogleSignInClient.getSignInIntent();
              startActivityForResult(signInIntent, RC_SIGN_IN);
          }
      });
  
  }
  
  
  
  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      // Result returned from launching the Intent from GoogleSignInClient.getSignInIntent(...);
      if (requestCode == RC_SIGN_IN) {
          // The Task returned from this call is always completed, no need to attach
          // a listener.
          Task&lt;GoogleSignInAccount&gt; task = GoogleSignIn.getSignedInAccountFromIntent(data);
  
          try{
  
              GoogleSignInAccount account = task.getResult(ApiException.class);
              firebaseAuthWithGoogle(account);
  
          } catch (ApiException e) {
              // Google Sign In failed, update UI appropriately
              Log.w(TAG, "Google sign in failed", e);
              // [START_EXCLUDE]
              Toast.makeText(this, "Gooogle Auth failed", Toast.LENGTH_LONG);
              // [END_EXCLUDE]
          }
  
      }
  }
  
  
  
  private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {
      Log.d(TAG, "firebaseAuthWithGoogle:" + acct.getId());
      // [START_EXCLUDE silent]
      //showProgressDialog();
      // [END_EXCLUDE]
  
      AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);
      mAuth.signInWithCredential(credential)
              .addOnCompleteListener(this, new OnCompleteListener&lt;AuthResult&gt;() {
                  @Override
                  public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {
                      if (task.isSuccessful()) {
                          // Sign in success, update UI with the signed-in user's information
                          Log.d(TAG, "signInWithCredential:success");
                          FirebaseUser user = mAuth.getCurrentUser();
                          Toast.makeText(LoginActivity.this, "Successful Auth", Toast.LENGTH_LONG).show();
                      } else {
                          // If sign in fails, display a message to the user.
                          Log.w(TAG, "signInWithCredential:failure", task.getException());
                          Toast.makeText(LoginActivity.this, "Authentication failed.",
                                  Toast.LENGTH_SHORT).show();
                          //updateUI(null);
                      }
  
                      // [START_EXCLUDE]
                      //hideProgressDialog();
                      // [END_EXCLUDE]
                  }
              });
  }
  </code></pre>