I’ve been trying to connect my google workspace account with Auth0.
filled in the client_id and secret properly, also managed to create a connection on postman. Received the access token there and managed to call the calender api endpoint from google. On postman it all worked.
When trying to login through Auth0 with my google workspace on my webapp, I get the following error message:
Some requested scopes were invalid.
{valid=[https://www.googleapis.com/auth/userinfo.email,
https://www.googleapis.com/auth/userinfo.profile], invalid=[offline_access]}
[Learn more about this error]
(https://developers.google.com/identity/protocols/oauth2)
If you are a developer of CompanyX,
see [error details](https://accounts.google.com/).
Error 400: invalid_scope
I Don’t understand why it works on postman and not on Auth0, any help is appreciated!
I don’t think the offline_access scope is needed for a Google connection - According to the docs here you’ll want to pass access_type=offline instead to get a refresh token.
Thanks for your quick reply!
It is what makes me confused, since I am using the google workspace enterprise connection within my auth0 tenant. I’m not passing anything to get the google access token, Auth0 is doing this under the hood if I’m correct.
I’m just filling in my google workspace client_id and secret, which are correct (if I enter the wrong credentials I get a different error message).
When logging in in my webapp, I get the universal login screen. But when I actually log in with a users password and email through the connection, the error pops up.
How are you initiating the login flow (call to /authorize which brings up universal login) in your app? Are you using an SDK? Does the enterprise connection you’ve configured work if you test it from within your Auth0 tenant directly?
Because it works in Postman, my guess is that the offline_access scope is being passed wherever the initial authorize request is being configured/initiated.