Skip to the content
Documentation

exp:expuser2fa

No ratings yet

Available since Exponential 6.0.15 (in development, not in a release yet).

Summary

Two-step sign-in and passkeys of an account: show them; reset the second step for someone who lost the phone, remove the passkeys of a lost device (changes are a dry run unless --apply)

Usage

./console exp:expuser2fa [options]
php bin/php/expuser2fa.php [options]
./console exp:user:2fa [options]

Aliases

exp:user:2fa

Help

The output of ./console help exp:expuser2fa (the script run with --help), without the standard options:

Usage: bin/php/expuser2fa.php [OPTION]... [USER]
Two-step sign-in and passkeys of an account
Shows whether the account has a second sign-in step (its method) and how many passkeys. --reset
removes the second step, for someone who lost the phone, and resets the failed sign-ins; where
two-step sign-in is enforced, the next sign-in asks for a new setup. It needs the two-step
sign-in extension (sevenx_authentication_2fa). --remove-passkeys removes every passkey of the
account, as an administrator does for a lost or stolen device. The audit records
access.user.two_factor.remove and access.passkey.revoke. Without --apply nothing is changed.

./console exp:user:2fa jane
./console exp:user:2fa jane --reset --apply
./console exp:user:2fa jane --remove-passkeys --apply


Options:
  --reset            Remove the second sign-in step (a lost phone) and reset the failed sign-ins; with enforced two-step sign-in the next sign-in asks for a new setup
  --remove-passkeys  Remove every passkey of the account (a lost or stolen device)
  --apply            Make the change; without it the command only lists what it would change (a dry run)
  --dry-run          The default, kept for scripts that pass it: list what would change, change nothing
  --as=VALUE         Act as this user (login, e-mail or id; default the user of [UserSettings] UserCreatorID); the audit records it as who did it
  --format=VALUE     text (default) or json (the machine output exp-user/1)

Options

Option Value Description
--reset - Remove the second sign-in step (a lost phone) and reset the failed sign-ins; with enforced two-step sign-in the next sign-in asks for a new setup
--remove-passkeys - Remove every passkey of the account (a lost or stolen device)
--apply - Make the change; without it the command only lists what it would change (a dry run)
--dry-run - The default, kept for scripts that pass it: list what would change, change nothing
--as required Act as this user (login, e-mail or id; default the user of [UserSettings] UserCreatorID); the audit records it as who did it
--format required text (default) or json (the machine output exp-user/1)

Arguments

[user]

Standard options

Every script also takes the standard options of the script framework: --help, --quiet, --siteaccess, --debug, --colors, --no-colors, --logfiles, --no-logfiles, --verbose and --allow-root-user.

Source

bin/php/expuser2fa.php, kernel/private/classes/commands/expuser2fa.php

See also

Generated example: exp:expuser2fa

Added to the reference for Exponential 6.0.15.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.