Configuring MFA Flow to require MFA once per session with Actions`

Problem statement

Is there a way to allow the users to be remembered for 30 days with MFA Actions?

Solution

Yes, it is possible to configure MFA to remember the user by passing an options object to the api.multifactor.enable() method. By doing so, you are making a call that tells the browser to remember that user for 30 days. See below:

exports.onExecutePostLogin = async (event, api) => {
  api.multifactor.enable('any', {allowRememberBrowser: true});
};

Reference Materials:

1 Like