title: Error 12501 authenticating with google sign-in
body: <p>I'm using <a href="https://developers.google.com/identity/sign-in/android/start" rel="noreferrer">google sign-in services</a> to authenticate users that use my app. I got it to work when I just requested email information</p>
  
  <pre><code>GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                      .requestEmail().build();
  </code></pre>
  
  <p>Then, I figured out I also need to request ID token to be able to authenticate with my backend so I did:</p>
  
  <pre><code>GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                      .requestIdToken(String.valueOf(R.string.server_client_id))
                      .requestEmail().build();
  </code></pre>
  
  <p>The problem is that it wouldn't let me log in after the changes. The status I keep getting each time I try to login is <code>Status{statusCode=unknown status code: 12501, resolution=null}</code>.</p>
  
  <p>I've been searching around and I found <a href="https://stackoverflow.com/questions/33583326/new-google-sign-in-android">this post</a> that is pretty much about the same thing. However, I didn't make any of the mistakes named by the people who answered, the oAuth Client ID in my dev console is for web application:
  <a href="https://i.stack.imgur.com/QqzCY.png" rel="noreferrer"><img src="https://i.stack.imgur.com/QqzCY.png" alt="clientIDs"></a>
  And <code>R.string.server_client_id</code> is the first client ID from the picture. the package names are of course correct in all placed otherwise it wouldn't even work without the token request. 2 people also suggested that the app needs to be signed for this to work, but googles documentation says that debug key should work too, and it doesn't make sense to make people sign the apps for debugging.</p>
  
  <p>I've been trying to figure this out for hours but with no success. What could be the problem? Please feel free to request more information I might have forgotten to put here.</p>