Issue with Google connection using Auth0

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.

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

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.

:wave: @matan are you using the access_token provided by Auth0 or Google? You mention it’s not working when when you try to execute actions. Which actions? When you authenticate using Google connection, the access_token you get back won’t be able to call the Google API. You’ll need to extract Google’s access token to perform actions with Google’s API. This is outlined here:

Please let me know if this is not what you are trying to do, or even if you were already able to solve your issue.