How to prompt for MFA once during an SSO session?

Hi I’m trying to start adding MFA to my users via an action - I don’t want to enable it globally (yet).

As it stands users only have to enter their userid & password once per session, but are asked for MFA between each app.

if (event.user.app_metadata.mfa_required) {
    api.multifactor.enable("any");
  }

I’ve had success with this - but I would prefer to keep remember browser off if possible. I just want them to enter it once per session.

if (event.user.app_metadata.mfa_required) {
    api.multifactor.enable("any", {allowRememberBrowser: true});
}

Hi @teddy8,

This community post should be of help.

You can modify it for your specific use case inside of the Action. By using this method, you will be responsible for when exactly the MFA challenge will be triggered.

If you have any other questions, feel free to reach out!

Have a good one,
Vlad