Disable Remember Device for 30 Days on Login

Overview

This article provides steps to remove the Remember Device for 30 days option from the login page. This prevents users from selecting the option during the login process.

Applies To
  • Remember Device
  • Login
  • Session 
Solution

To disable the Remember Device for 30 days checkbox, a post-login Action must be implemented to enforce a custom Multi-Factor Authentication (MFA) policy. This involves adding a script to the Auth0 environment.

  1. Navigate to the Auth0 dashboard and select Actions from the side menu, then choose Library.
  2. Click on Create Action and select Build from scratch.
    1.jpeg
  3. Enter a descriptive name for the action in the Name field, set the Trigger field to Login/Post Login, choose suiting or newest node version for the Runtime, and click Create.


Paste the following Action code into the editor:

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


2.jpeg

  1. Click Save Draft and then Deploy.
  2. Return to the Actions" menu and select "Flows.
  3. Click on Login.
  4. Under Add Actions on the right side of the screen, click on Custom.
  5. Drag and drop the previously created Action to the position between Start and Complete.

    3.jpeg
  6. Click Apply to enforce the changes.

 

By following these steps, the "Remember Device for 30 days" checkbox will be disabled, and users will not see this option during the login process.

 

Related References

Recommended content

No recommended content found...