I implemented http://android-developers.blogspot.fi/2013/01/verifying-back-end-calls-from-android.html in my android application. I added a client id for the application in our development version of the google api project and made the android application ask for id_token
idToken = GoogleAuthUtil.getToken(AuthenticatorActivity.this, accountName, "audience:server:client_id:1234567890.apps.googleusercontent.com");
and all this worked quite near perfectly. Then I wanted to test if it works in production. I added a client id to the production version google api project, used it in code and rebuilt the production version app. Since then I have always gotten
GLS error: INVALID_AUDIENCE <Removed>@gmail.com audience:server:client_id:1234567890.apps.googleusercontent.com
as a response and a GoogleAuthException with the same message.
I have tried to remove and recreate the client id’s one at a time (So I tested with just the development client_id and unmodified code from yesterday, same result.), I have checked that I really used correct SHA1’s when creating the client id’s and I have rebuilt both versions of the app and tested with multiple devices and google accounts.
Did I break the google api projects server by adding a client_id with the same android package name to both projects, or is there just something I have simply overlooked?
Edit: It seems I really broke something, as creating a new client id in a third project enables me to get the id_token again without changes to the code.
There was a bug (since fixed) with Google’s handling of newly created client_ids (it didn’t affect live apps, only apps just newly registered). Have you tried again in the last few days?