We are evaluating the migrations of rules to actions.
I could see examples about how to set the custom claims to an access token in actions. But how do we read the claims from access token in actions? Atleast as far as i could see, only api.accessToken has setCustomClaims method. Is there any other way to achieve this?
Also we are reading and altering access token scopes in our rules. It seems, it is a limitation in actions. Do we have any alternative to achieve this?.
Hello,
Currently, Auth0 Actions do not support reading claims directly from access tokens. You can work around this destiny credit card by storing necessary claims in user metadata and accessing them in your actions.
For altering access token scopes, Auth0 Actions now support adding or removing scopes. You can use the api.accessToken.setCustomClaim method to manage scopes.