Email One-Time Password (OTP) is a temporary password sent to a generated email address used by Bright to authenticate to applications. Bright provides an email address that cannot be customized. Emails are automatically deleted after 24 hours.

How to use it:

  1. Use the email address provided by the Bright web app.
  2. Set this email as the test user's email.

👍

If you can't use the provided email due to restrictions, set up forwarding from your local email to the Bright-provided address.

To set up the Email OTP, do the following:

  1. Open the AUTHENTICATIONS tab → Click + Create authentication → Open the Advanced tab
  2. To create a new Email OTP, click + Add OTP:
  1. Then, select the Email OTP type from the list below:
  1. Specify the following fields:
    1. Name: use alphanumeric symbols and the underscore (_) to customize the OTP name, if needed
    2. Subject regex: use your subject from the email, for example: Your OTP code
    3. Body OTP regex: this parameter controls where the Bright engine will find the code in the email. Use a capturing group to locate a code in the email. For example, here's the regex for a 6-digit code: (\d{6}). The search is first done in the plain-text body and then in HTML.
  2. Click Create to proceed, you won't be able to get an email address without creating the authentication object.
  1. Now you should edit this authentication object to get the email address:

  2. Now go back to the Advanced tab and expand the OTP you are setting.

    📘

    Note, this email address is generated automatically and not customizable.

  3. Go to the Auth flow setup tab and configure the stage. For this example, we will describe a simple case of the Manual Browser-Based Form Authentication for the brokencrystals.com. In this example, the extracted value from an email will be pasted to the Password text field. Use this code to reference the Name field OTP settings: {{ auth_objects.otps.token1 }}.

  4. Now click the Test authentication button to proceed.

As you can see in the screenshot, an OTP code was successfully extracted from the email and pasted to the test login page.

🚧

If you want to clone the Authentication Object with Email OTP, save it before testing. Otherwise, the new email won't be generated.