Usage
Arguments
string
required
6-digit verification code from SMS or Authenticator app
Options
string
default:"totp"
New 2FA Method type to activate
Allowed values: sms, totp
string
Secret token from setup process (required)
string
Phone number for SMS method (E.164 format)
string
Label for the new 2FA method
Description
Complete the 2FA setup process by verifying your code.NOTE: Prior to running this command, you must authorize your attempt to create a new 2FA method by following the instructions in the
vastai tfa auth-new command.
This is required to ensure that only you can add new 2FA methods to your account.
For TOTP (Authenticator app):
- Run ‘vastai tfa totp-setup’ to get the manual key/QR code and secret
- Enter the manual key or scan the QR code with your Authenticator app
- Run this command with the 6-digit code from your app and the secret token from step 1
- Run ‘vastai tfa send-sms —phone-number <PHONE_NUMBER>’ to receive SMS and get secret token
- Run this command with the code you received via SMS and the phone number it was sent to