We are currently using Google OpenId Connect to authenticate our users.
I'm successfully retrieving the access token and id token via the token_endpoint as described here. Later on I validate the id token as described here. The token_endpoint will be received via the discovery document (as recommended by Google).
Problem
But since a few days there seems to be a new version of the discovery document, because the token_endpoint has changed from
https://www.googleapis.com/oauth2/v3/token
to
https://www.googleapis.com/oauth2/v4/token
The new endpoint returns a slightly longer id token which can no longer be validated with https://www.googleapis.com/oauth2/v1/tokeninfo?id_token=xxx. The request returns with the error
{
"error": "invalid_token",
"error_description": "Invalid Value"
}
If I hard code the token_endpoint to the old url (https://www.googleapis.com/oauth2/v3/token) everything works fine like before.
Question
Since the old OpenID 2.0 has been shut down a few days ago, I thought there may be some correlation between the shutdown, the new token_endpoint and the validation of the id_token, but I couldn't find anything yet.
Is there any solution to validate the new slightly longer id token via the https://www.googleapis.com/oauth2/v1/tokeninfo?id_token=xxx url? For debugging it is easier to use the tokeninfo endpoint, later on in production we'll probably validate the token locally (Validating Google ID tokens in C#).