title: Flutter - Google Sign In - Android - Access Token always returns invalid credential
body: <p>I'm implementing the Google Sign In option on a Flutter app, it works fine with iOS (emulator) but in Android (emulator) the credentials that I get are always marked invalid when I check them with Google.</p>
  <pre><code>Future&lt;GoogleSignInAuthentication?&gt; _validateGoogleToken(
    GoogleSignInAccount? googleSignInAccount) async {
  try {
    if (googleSignInAccount?.authentication != null) {
      final credentials = await googleSignInAccount?.authentication;
      if (credentials != null &amp;&amp; credentials.idToken != null) {
        final urlRequest = Uri.parse(https://www.googleapis.com/oauth2/v3/userinfo);
        final response = await http.get(urlRequest, headers: {
          'Authorization': 'Bearer ${credentials.accessToken}',
        });
        final responseData = json.decode(response.body);
        if (responseData['error'] == null &amp;&amp;
            responseData['email_verified'] == true) {
          this._profile = Profile.fromJson(json.decode(response.body));
          _authenticationToken = credentials.idToken!;
          return Future.value(credentials);
        }
      }
    }
    return Future.value(null);
  } catch (error) {
    return Future.value(null);
  }
  </code></pre>
  <p>}</p>
  <p>The Google OAuth always returns me that the credentials are invalid. However, in the case of iOS, the credential that my app receives always gets validated with no issues.</p>
  <p>I noticed that for some reason the credential in Android, is always the same and it seems to be shorter/truncated than the one from iOS.</p>
  <p>Any recommendations?</p>