How to stop or skip next actions in flow

I have created 3 actions in Login flow

  1. Check MFA enrollment for certain users & trigger MFA enrollment if not done before
  2. Check sensitive scopes requested & force user to complete MFA first
  3. Enrich AccessToken & IDToken

I have separated them to make it clear to understand and easy to test.

How can I stop/skip execution of other actions in a flow when user not enrolled for MFA in the first action ?

Hi @srikanth.dyapa,

Thanks for reaching out to the Auth0 Community!

In this scenario, you will have to include a condition in your Actions to check if these users do not belong to a group of whitelisted users.

One option is to trigger your other actions earlier in the flow before your three MFA Actions. In that way, when it reaches your checking MFA enrollment action, you can check if they are whitelisted users and continue execution. Otherwise, pass and do nothing. Similarly for the other two actions.

Does that help?

Thank you.

So basically there is no way to stop other actions to execute & we have to manage it with if/else pre-check conditions everywhere. In that case I feel it is better to put all the logic in one action instead of multiple.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.