In my case, I had a slash in my IAM authentication provider for accounts.google.com, for example:

The one who ends the slash is wrong; one that does not have a slash works correctly. Interestingly, AWS will get the exact same print for both of them.
In the AWS IAM console, under Accounts> Providers> accounts.google.com, add the key for "Android client for com.example.yourstuff (automatically created by Google)" as an audience. It looks something like this: "222222222222-x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8x8.exe ..)
When calling GoogleSignInOptions.Builder you need to call #requestIdToken using the web application key under the OAuath 2.0 client IDs on the Goole API> API Manager> Credentials page:
GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken("999999whateverxxxx.apps.googleusercontent.com") .build()
(The token can be cached if you run the application with the requestIdToken call, then delete the requestIdToken request and run it again, you can still get the result from the getIdToken () call in the GoogleSignInAccount object.)
The google login code will eventually give you a GoogleSignInAccount object. Call #getIdToken on this object to get a string (in my case, it's 83 characters) that you are going to enter in the hash login:
If you do not have the correct key specified in IAM> Providers> accounts.google.com, you will get a NotAuthorizedException(Invalid login token. Incorrect token audience.) Exception.
If you added an additional slash to accounts.google.com/, you will receive a NotAuthorizedException(Token is not from a supported provider of this identity pool.)
If you try to add accounts.google.com/ to the login hash login like this (do not do this, correct the IAM identity provider name):
logins.put("accounts.google.com/", token);
You will get a NotAuthorizedException(Invalid login token. Issuer doesn't match providerName) .
If you use the wrong token, you will get a NotAuthorizedException (Invalid login token. Token signature invalid.) Exception.
(I suspect there are many other ways to fail; this is just the one I found.)