Skip to main content
Remove a 2FA method from your account

Usage

vastai tfa delete [--id-to-delete ID] [--code CODE] [--method-type METHOD_TYPE] [--secret SECRET] [--backup-code BACKUP_CODE] [--method-id ID]

Options

--id-to-delete
integer
ID of the 2FA method to delete (see vastai tfa status)
--code
string
2FA code from your Authenticator app, SMS, or Email to authorize deletion
--method-type
string
2FA Method type. Only use when you only have one method of this type Allowed values: email, sms, totp
--secret
string
Secret token (required for SMS or Email 2FA)
--backup-code
string
One-time backup code (alternative to regular 2FA code)
--method-id
string
2FA Method ID to use if you have more than one of the same type (‘id’ from tfa status)

Description

Remove a 2FA method from your account. This action requires 2FA verification to prevent unauthorized removals.
NOTE: If you do not specify —id-to-delete, the system will attempt to delete the method you are using to authenticate. However please be advised, it is much safer to specify the ID to avoid confusion if you have multiple methods.
Use vastai tfa status to see your active methods and their IDs.

Examples

# Delete method #123, authorize with email code and secret from `tfa send-email`
 vastai tfa delete --id-to-delete 123 --method-type email --secret abc123def456 -c 456789

 # Delete method #123, authorize with TOTP/Authenticator code
 vastai tfa delete --id-to-delete 123 --method-type totp --code 456789

 # Delete method #123, authorize with SMS and secret from `tfa send-sms`
 vastai tfa delete -id 123 --method-type sms --secret abc123def456 -c 456789

 # Delete method #123, authorize with backup code
 vastai tfa delete --id-to-delete 123 --backup-code ABCD-EFGH-IJKL

 # Delete method #123, specify which TOTP method to use if you have multiple
 vastai tfa delete -id 123 --method-id 456 -c 456789

 # Delete the TOTP method you are using to authenticate (use with caution)
 vastai tfa delete -c 456789

Global Options

The following options are available for all commands:
OptionDescription
--url URLServer REST API URL
--retry NRetry limit
--rawOutput machine-readable JSON
--explainVerbose explanation of API calls
--api-key KEYAPI key (defaults to ~/.config/vastai/vast_api_key)