MFA authenticator logins

In an application that uses time-based one-time password (TOTP) authentication the user provides two forms of authentication:

  • A regular password
  • An additional temporary code generated from a TOTP authenticator app, such as Google Authenticator, Microsoft Authenticator, or Authy

This article explains how to train a login flow for an application that requires a temporary code from an authenticator app, also known as TOTP authentication.

📘

Early access program

Support for TOTP authentication is currently available as an early access program. To enable this feature for your workspace, toggle on "MFA Authenticator" on the Labs page: Settings > Labs.

Prior to general availability, functionality is subject to change. We highly encourage early access participants to share feedback with their customer success manager or in the mabl Product Portal.

You can test applications that use TOTP authentication by creating mabl credentials and adding an MFA Authenticator code step to your browser test to insert the temporary code. Here's how it works:

  1. Create new credentials
  2. Launch the mabl Trainer
  3. Trainer the MFA login

Create new credentials

📘

Permissions

Only workspace owners and editors can create mabl credentials.

Before creating mabl credentials for MFA, enable MFA in your app and get a screenshot of the QR code from the application under test. Alternatively, you may use the secret key.

Then, when you're ready, take the following steps:

  1. Open the Credentials page: Configuration > Credentials.
  2. Click on + New credentials.
  3. Give the credential set a name. Optionally, you can also add a description.

👍

Adding a description

Adding a description gives your team more context about the credentials and makes collaboration easier.

  1. Enter the username and password.
  2. Set up an MFA code by doing one of the following:
    • Enter the secret text code in the MFA Authenticator secret code field.
    • Click on the Authenticator QR Code button and upload a screenshot or image of the QR code.
1978

Adding MFA credentials

  1. Click Save to create the credentials.

The type of the new credentials is "basic with MFA." Moving forward in this guide, we'll refer to these credentials as "MFA credentials."

You can view your MFA credentials in Configuration > Credentials. The MFA (TOTP) authenticator code refreshes every 30 seconds.

634

Viewing MFA credentials

Launch the mabl Trainer

After creating MFA credentials, you're ready to train an MFA login in the Trainer! Make sure the browser test is associated with the MFA credentials you just created:

New browser test: In the browser test creation form, toggle on Show advanced options and select the MFA credentials you intend to use. Alternatively, associate the test with a plan that is associated with those credentials.

2118

Adding credentials to a new test

Existing browser test: Click the Edit test button and select "Launch Trainer." In the Edit Test Configuration modal, select the MFA credentials you intend to use.

1986

Configuring credentials for an existing test

Train the MFA login

With the application login page open in the mabl Trainer and the Record button on, take the following steps:

  1. Input the variable app.defaults.username in the username field. This variable is the username from the MFA credentials.
  2. Input the variable app.defaults.password in the password field. This variable is the password from the MFA credentials.
  3. When the application prompts you for an MFA code, click on the plus sign to add a step.
694

Adding a step

  1. Select MFA Authenticator code. The Trainer prompts you to select an input on the browser window.
  2. Click on the input field where you want to insert the authenticator code. The Trainer inserts the authenticator code into the input field.
1363

Entering the temporary code

  1. Submit your login. To ensure that the login is successful, record steps to complete the login immediately after the MFA authentication step. After 30 seconds, the temporary authentication code is invalid.