How can I update the access token in a Machine to Machine application using Actions? I’ve referred to the official documentation, but I couldn’t find a method to update the “scope” claim. While I can set custom claims, modifying the “scope” claim seems elusive. Can you provide guidance on this?
Official Doc :
Here’s the snippet I’ve been using to add a new claim:
exports.onExecuteCredentialsExchange = async (event, api) => {
// Set the custom claim for the access token
api.accessToken.setCustomClaim(‘http://scope’, ‘free’);
};
I’d appreciate any assistance you can offer.