Pick a method
Use a login made for the workflow, such as a service account.
Authenticator app
1
Get the setup key
Turn on two-factor with an authenticator app on the portal. Copy the setup key. If the site shows only a QR code, take a screenshot of it.
2
Store it on the secret
On the Secrets tab of the Logins page, add a TOTP seed field to the portal’s username and password secret. Paste the setup key or an
otpauth://totp/ link, or upload the QR code screenshot. Check that the live code matches your authenticator app.3
Use it
An agent node generates codes with the Generate TOTP skill. A script uses
asteroid.generateTotp.Email codes
In the mailbox that receives the codes, add a forwarding rule that sends them to the profile’s inbox,{prefix}@agentmail.asteroid.ai. An agent node reads the code with get_mail. Scripts cannot read mail. Needs the Startup plan or above. See Email inbox.
SMS, push and other methods
To forward SMS codes to the profile’s email inbox, use a third-party tool, such as an Apple Shortcut. The workflow then reads them as email codes. Otherwise, a person enters the code, or approves the push, while the run waits.- Agent node: turn on Ask User Questions. The run pauses with
paused_by_agent. Reply on the execution page, or withPOST /executions/{id}/user-messages. See Ask user question. - Script: ask with
waitForReply. Answer on the execution page, withasteroid execution answer, or withPOST /executions/{id}/answers. See Ask a question.
EXECUTION_PAUSED to a webhook or Slack. See Webhooks and Slack.
For another two-factor setup, contact support.
Fewer codes
Reuse the session so runs sign in less often. Set Auth strategy in the environment’s Auth step.
See Warm cache and Warm pool.

