Get OTP
Work out the current 6-digit two-factor code from its secret.
In both apps
WarpX Browser
WarpX Phone
Get OTP gives you the code an authenticator app would show right now, from the secret the account's two-factor setup handed out. Use it just before a login step asks for the code, then type the code with OTP input or Type text. It does not need a tab open.
Settings
- OTP secret
The base32 secret, such as
JBSWY3DPEHPK3PXP. Spaces, hyphens and case do not matter. Rather than typing it in, reference it: from the profile's resources as{{Resource.Facebook.2Fa}}, or from Credentials as{{secrets.facebook2fa}}.Example{{Resource.Facebook.2Fa}}- Assign to variable
Store the code in a variable.
ExampleChecked- Variable namewhen Assign to variable is ticked
The variable that receives the code.
ExampleotpCode- Insert to table
Also put the code into a cell of the table.
ExampleUnchecked- Select columnwhen Insert to table is ticked
The column that receives the code.
Exampleotp
Every block also has the shared block settings — a description, Disable block and what to do on an error. Fields that take text accept data from earlier blocks.
What it hands on
A 6-digit code as text, leading zeros kept. It goes to the variable or column you chose, and on as {{prevBlockData}}.
Example: Sign in with the profile's Facebook two-factor code
- Open URL
- Type text
- Click element
- Get OTP
- OTP input
- Give the profile a Facebook account under its resources, with a
2Fafield holding the secret. - In the workflow, sign in with Type text using
{{Resource.Facebook.Username}}and{{Resource.Facebook.Password}}. - When the code page shows, add Get OTP and type
{{Resource.Facebook.2Fa}}in OTP secret. - Tick Assign to variable and type
otpCode. - Add OTP input on the code boxes with the value
{{variables.otpCode}}.
On WarpX Phone
- A WarpX Phone run has no profile and so no profile resources:
{{Resource.Facebook.2Fa}}stays as typed and the block stops withThe OTP secret is not valid base32. Keep the secret in Credentials and write{{secrets.facebook2fa}}, or read it from the table or a file.
Good to know
- The code is the standard 30-second, 6-digit kind. It is worked out when the block runs, so run the block right before the code is typed.
{{Resource.<Platform>.<Field>}}is read from the profile the workflow runs in. The field name must match the resource's field exactly, such as2Fa. If the profile has no such account, the reference stays as typed and the block stops withThe OTP secret is not valid base32.- An empty secret stops the block with
The OTP secret is empty. - The secret is your second factor. Keep it in the profile's resources or in Credentials, so the workflow file does not carry it.