Email OTP

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 7 days.

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:

  3. Then, select the Email OTP type from the list below:

  4. 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.
  5. Click Create to proceed, you won't be able to get an email address without creating the authentication object.

  6. Now you should edit this authentication object to get the email address:

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

    📘

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

  8. Go to the Auth flow setup tab and modify the relevant value to use the OTP reference. If the name of the OTP token is token1, the value you should use is: {{ auth_objects.otps.token1 }}.


🚧

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