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:
- Use the email address provided by the Bright web app.
- 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:
-
Open the AUTHENTICATIONS tab → Click + Create authentication → Open the Advanced tab.
-
To create a new Email OTP, click + Add OTP:
-
Then, select the Email OTP type from the list below:
-
Specify the following fields:
- Name: use alphanumeric symbols and the underscore (_) to customize the OTP name, if needed.
- Subject regex: use your subject from the email, for example:
Your OTP code
. - 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.
-
Click Create to proceed, you won't be able to get an email address without creating the authentication object.
-
Now you should edit this authentication object to get the email address:
-
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. -
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.
Updated 2 days ago