Set property on idToken in Actions

Hello,

I am trying to migrate a staging tenant from Rules to Actions.

First issue:
I have a rule defined where in a custom property in idToken is being set throught context

context.idToken.email_verified = true

I would like to achieve the same using Actions. I did not find any documentation apart from setting custom claims.

Second issue:
In another rule, I have the below line:

context.idToken["https://website.com/claim"].is_property = true;

I want to do the same in actions. Using the setCustomClaim method, it sets a new value. Since my claim is an object, I would like to set a property while rest of the properties remain as it is.

Any solutions for the above 2 issues ?

Thank you!

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!