Run Actions Only Once per Session
Last Updated:
Overview
There are some actions in the tenant which calls multiple apis, is there any way we could run these actions only once per session, and not on silent auth calls or refresh token exchanges? Doing so would help to make our actions run faster.
Applies To
- Actions
Solution
For Refresh token flows, you can just add the following to the beginning of each action to bypass it:
if(event.transaction.protocol === "oauth2-refresh-token"){
return;
}
For silent auth flows you can just change the condition to event.request.query.response_mode === 'web_message' and it should bypass the rest of the Action logic for that action as well:
if(event.request.query.response_mode === 'web_message'){
return;
}