Hello, I have been trying to add an action to my login flow and have been having some issues.
I have the below action in my login flow:
exports.onExecutePostLogin = async (event, api) => {
const namespace = 'test-1865945745686';
if (event.authorization) {
console.log('test!!')
console.log(event.authorization.roles)
api.idToken.setCustomClaim(`${namespace}/roles`, event.authorization.roles);
api.accessToken.setCustomClaim(`${namespace}/roles`, event.authorization.roles);
}
}
When I use the ‘Try your Login box’ option everything works as expected. However, when I try and do it through my React application the action does not fire, it gets no logs and the roles claim is not on my token. Any help is appreciated.
