Skip to main content
Authorize your account to add a new 2FA method

Usage

Options

string
2FA code from Authenticator app, SMS, or Email
string
Secret token from previous auth step
string
default:"email"
2FA Method type. Only use when you only have one method of this type Allowed values: email, sms, totp
string
One-time backup code (alternative to regular 2FA code)
string
2FA Method ID if you have more than one of the same type (‘id’ from tfa status)

Description

Authorize your account to add a new 2FA method by verifying via email or an existing method. This is a required step to ensure that only you can add new 2FA methods to your account. Step 1. Run command with your chosen verification method:
  • If you have an existing 2FA method set up, you can use ‘—backup-code BACKUP_CODE’ to immediately authorize (skip Step 2)
  • Use —method-type or —method-id ID to specify which existing method to use for verification (see vastai tfa status for available methods and their IDs)
  • Use —method-type email if you have a verified email address and/or no other 2FA methods set up to receive a code via email
Step 2. When prompted, enter the 2FA code from your 2FA method of choice to confirm authorization. Note: If you exit the command before being able to enter the code, you can run this command again with —secret SECRET and —code CODE to complete the authorization step as long as the code has not expired.

Examples

Global Options

The following options are available for all commands: