Auth0 Home Blog Docs

Issue with Google connection using Auth0

oauth2
google

#1

Hello,

I have a Auth0 authentication page which has 3 ways to login to my service:

  1. Facebook
  2. Database
  3. Google

The first 2 works great and I get the information in the response under “access_token”. The third one doesn’t work. I get an invalid signature (JWT) - e.g. “identities”:

[{"provider":"google-oauth2","access_token":"ya29.GlzZBbN3fRXn_L__EhngeL9y3HxYtf0BqDHL0qVdZx5jutowhbm1biA0bcfQkDr_Th6e3vsesy1UFLfD4cKyXGASN192uk6djLDomimVqeWpLSpljJtnQbtbcwGSiw","expires_in":3600,"user_id":"{PRIVATE}","connection":"google-oauth2","isSocial":true}]

If I try to check it in “https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=” I get an error as well as validate it at “jwt.io”.

I would appreciate your help.


#2

Can you provide the error you get from Google’s verifier and jwt.io?


#3

Yes.

  1. https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=ya29.GlzZBbN3fRXn_L__EhngeL9y3HxYtf0BqDHL0qVdZx5jutowhbm1biA0bcfQkDr_Th6e3vsesy1UFLfD4cKyXGASN192uk6djLDomimVqeWpLSpljJtnQbtbcwGSiw

Gives “Invalid Value”.

I took this access_token from the rule hook that I have for Google integration. Even when I get the access_token after finishing the connection it gives the same error but the access token is then valid by JWT.
The problem is that it is not valid by Google, can Auth0 gives token_id and not access_token? maybe that’s the issue?

I can see that the connection was done properly and the user is registered under Users but the access_token is not working when I try to execute actions - for now I just need to login with that access token.

Would appreciate your help.