Modify scope in post login action

I’m trying to migrate Rules to Actions. In rule i have following code to modify scope for accesstoken:

context.accessToken.scope = scopes;

Now I’m trying to do similar thing in action
api.accessToken.scope = scopes.

but I’m not allowed.

and using setCustomClaim("scope"), I have following error:

The "scope" claim cannot be set.

How can I set custom scopes obtained?

2 Likes

I’m also currently encountering an issue with updating an existing claim in action. Does anyone have any ideas on how to go about updating a claim? Any guidance or suggestions would be greatly appreciated.

Hey there!

As this topic is related to Actions and Rules & Hooks are being deprecated soon in favor of Actions, I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!

Learn more here!