Auth0 Home Blog Docs

Adding API scopes to google-oauth2 token

jwt
auth0
social-connections
scopes
login

#1

I am currently using Auth0 for authentication in my SPA and I defined some scopes to be added to the token in order to restrict the actions of the user on the resources.

My problem is that I allowed connections with Google and LinkdIn, and the token that is being generated does not contain the scopes I defined. Should I create some rule to add these to the token?

Token with all scopes:

enter image description here

Token without all scopes:

enter image description here

Help would be greatly appreciated!


#3

:wave: @aboxho

You can create a Rule to add the scopes to the access token. There is a great example explained here on How to assign custom scopes to users? that shows how you can add the scopes with a Rule. Please let me know if this solved your issue!