Disable the "Remember this device for 30 Days" Option on the Auth0 MFA Challenge Screen

Overview

Implementing a post-login Action to enforce a custom Multi-Factor Authentication (MFA) policy removes the Remember this device for 30 days option from the MFA challenge screen. Users will not encounter the Remember this device for 30 days option during the MFA challenge process.

Applies To

  • Auth0
  • Multi-Factor Authentication (MFA)
  • Universal Login

Solution

How is the "Remember this device for 30 days" option disabled?

Create and deploy a custom post-login Action in the Auth0 dashboard to enforce a custom MFA policy without the remember browser option.

  1. Navigate to the Auth0 Dashboard, select Actions from the side menu, and choose Library.
  2. Click Create Action and select Build from scratch.

Build from scratch

  1. Enter a descriptive name for the action in the Name field, set the Trigger field to Login / Post Login, choose the newest node version for the Runtime, and click Create.
  2. Paste the following Action code into the editor:
    exports.onExecutePostLogin = async (event, api) => {
      api.multifactor.enable("any",{allowRememberBrowser:false});
    }
  3. Click Save Draft and select Deploy.
  4. Return to the Actions menu and select Flows.
  5. Click Login.
  6. Under Add Actions on the right side of the screen, click Custom.
  7. Drag and drop the previously created Action to the position between Start and Complete.

previously created Action

  1. Click Apply to enforce the changes.

 

Related References

Recommended content

No recommended content found...