title: Should I use GoogleAuthUtil.getToken(...) or not?
body: <p><strong>Background:</strong></p>
  
  <p>I need to authenticate on my server back-end so I know the client is genuine. In my Android game I connect to <code>Games.API</code> via <code>GoogleApiClient</code>.</p>
  
  <p>I only want to have to sign in once, which I want to do via <code>Games.API</code>, as this gives me many advantages (Google Play Games leaderboards, achievements, etc.)</p>
  
  <p>I have been able to get an authorisation token using <code>GoogleAuthUtil.getToken(...)</code> which I can do after I sign into <code>Games.API</code>, which seems to give me a token. Good so far.</p>
  
  <p>But <a href="https://developers.google.com/identity/sign-in/android/migration-guide" rel="nofollow noreferrer">Google says this is not safe</a> and says I should <a href="https://developers.google.com/identity/sign-in/android/migration-guide#migrate_from_the_googleauthutil_server_auth_code_flow" rel="nofollow noreferrer">migrate to ID token flow</a> instead. But, as I understand it this approach would require me to use</p>
  
  <pre><code>Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
  startActivityForResult(signInIntent, RC_SIGN_IN);
  </code></pre>
  
  <p>which means instigating an <strong>additional sign in</strong> to that for <strong>Games.API</strong>. Furthermore, it is not possible to <code>addApi</code> both <code>Games.API</code> <strong>and</strong> <code>Auth.GOOGLE_SIGN_IN_API</code> to the same <code>GoogleApiClient</code> !</p>
  
  <p>Ok, so upgrade to the latest google-play-services (at least r29), using which I can use <code>Games.API</code> with <code>Games.getGamesServerAuthCode(...)</code> to obtain an auth token for my server. But this has two problems: (1) it requires Android 6.0 or above which blocks out 80% of the market, and (2) <strong>it's deprecated !</strong></p>
  
  <hr>
  
  <p><strong>Question:</strong></p>
  
  <p>Should I use <code>GoogleAuthUtil.getToken(...)</code> or not, and if not what are my options given that I only want to sign in using <code>Games.API</code> ?</p>
  
  <p>By sign in I mean present the user with log in visuals. I don't mind signing into something else so long as the user does not have to interact with the sign in...</p>
  
  <hr>
  
  <p><strong>Note:</strong></p>
  
  <p>I originally asked <a href="https://stackoverflow.com/questions/39993528/android-balancing-market-presence-api-function-availability-and-approach-to-c">this question</a> when I first started out. The current question hopefully clarifies the situation.</p>