Hi @joshua, hope you are doing well. I am calling the same API from my NestJS project and getting the somehow same error.
code: [ExternalAuthenticationException]GoogleTokenInfo
message: A request to the Google Token Info API has failed. Unable to complete this login request.
And from the Fusion Auth debug log,
Request to the [https://www.googleapis.com/oauth2/v3/tokeninfo] endpoint failed. Status code [400].
Error response is
{
"error_description" : "Invalid Value"
}
But if I curl the token received from the google, it shows me the correct response,
curl "https://www.googleapis.com/oauth2/v3/tokeninfo?access_token=ya29.A0ARrdaM-mIQDJ645tNQv5ifTZ7QxfhTNK_gE4pYsukhoU_EVt7ejSjW6H22fYW5ICgx89IXXXXXXXXXXXXXXXXXXXWBhUUhclMJx2p3xcpekxKjs1B2"
{
"azp": "939548483275-vnakrrcv6c7t2fmdcji8nbcom6dn52or.apps.googleusercontent.com",
"aud": "939548483275-vnakrrcv6c7t2fmdcji8nbcom6dn52or.apps.googleusercontent.com",
"sub": "116524708611814561365",
"scope": "https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile openid",
"exp": "1646312085",
"expires_in": "3425",
"email": "xxxxxx@gmail.com",
"email_verified": "true",
"access_type": "online"
}
From NestJS I called that request as follows,
const response = await this.fusionClient.identityProviderLogin({
applicationId: "XXXXXX",
data: {
token: req.user.accessToken,
},
identityProviderId: "82339786-3dff-42a6-aac6-1f1ceecb6c46",
});
Could you please put some light on it?
Thanks.