# urbestack-user-second-factor-confirm

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-user-second-factor-confirm --name NAME --code DIGITS [--grant-token ID]
```

## Description

Confirms a pending second factor using the authenticator app's six-digit code supplied with --code. It prints eight single-use recovery codes, shown only once.

On a server that requires a second factor for administrators, use --grant-token with the ID of the session opened at login solely for enrolment. The session must belong to the same user. Confirmation grants the session the all scope only if its scopes are still empty. The all scope excludes the export scope, which covers both export and import.

## Same in the API

- [POST /auth/second-factor/confirm](https://urbestack.com/docs/api/post-auth-second-factor-confirm.md): Confirm the caller's pending second factor

## Command family: user

- [urbestack-user-add](https://urbestack.com/docs/commands/urbestack-user-add.md): Creates an UrbeStack account.
- [urbestack-user-del](https://urbestack.com/docs/commands/urbestack-user-del.md): Deletes an UrbeStack account and its domains, subdomains, DNS zones, databases and database users.
- [urbestack-user-list](https://urbestack.com/docs/commands/urbestack-user-list.md): Lists UrbeStack accounts.
- [urbestack-user-second-factor-codes](https://urbestack.com/docs/commands/urbestack-user-second-factor-codes.md): Replaces the user's recovery codes with eight new codes and prints them once.
- [urbestack-user-second-factor-enrol](https://urbestack.com/docs/commands/urbestack-user-second-factor-enrol.md): Starts enrolment of a TOTP second factor and prints the secret as text and as an otpauth:// URI for an authenticator app.
- [urbestack-user-set](https://urbestack.com/docs/commands/urbestack-user-set.md): Updates an existing UrbeStack account.
