Pangctl command to reset a user’s passkeys (WebAuthn credentials) #1100

Closed
opened 2026-04-05 18:17:52 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @adrianeastles on 8/8/2025

Description

Adds an admin CLI command to remove a user’s passkeys (WebAuthn credentials) by email. This is for recovery/support when a user is locked out or needs to re-enroll passkeys.

  • Command: reset-user-security-keys
  • Input: --email <user@example.com>
  • Effect: Deletes all WebAuthn credentials for that user
  • Output: Clear logs for user lookup, keys found, and keys deleted

How to test?

Run the command and observe the output.

  1. Execute:

    pangctl reset-user-security-keys --email user@example.com
    
  2. Expected behaviors:

    • If the user exists and has passkeys:
    • If the user exists but has no passkeys:
      • Output includes:
    • If the user does not exist:

Screenshots

Screenshot 2025-08-08 at 8 16 06 pm Screenshot 2025-08-08 at 8 15 55 pm Screenshot 2025-08-08 at 8 15 43 pm Screenshot 2025-08-08 at 8 18 56 pm
*Originally created by @adrianeastles on 8/8/2025* ## Description Adds an admin CLI command to remove a user’s passkeys (WebAuthn credentials) by email. This is for recovery/support when a user is locked out or needs to re-enroll passkeys. - Command: `reset-user-security-keys` - Input: `--email <user@example.com>` - Effect: Deletes all WebAuthn credentials for that user - Output: Clear logs for user lookup, keys found, and keys deleted ## How to test? Run the command and observe the output. 1) Execute: ```bash pangctl reset-user-security-keys --email user@example.com ``` 2) Expected behaviors: - If the user exists and has passkeys: - Output includes: - “Looking for user with email: user@example.com” - “Found user: user@example.com (ID: …)” - “Found N security key(s) for user ‘user@example.com’” - “Successfully reset security keys for user ‘user@example.com’” - “Deleted N security key(s)” - If the user exists but has no passkeys: - Output includes: - “User ‘user@example.com’ has no security keys to reset” - If the user does not exist: - Output includes: - “User with email ‘user@example.com’ not found” ## Screenshots <img width="480" height="73" alt="Screenshot 2025-08-08 at 8 16 06 pm" src="https://github.com/user-attachments/assets/93d91ac6-c182-4ebd-ac86-2611d863c493" /> <img width="560" height="89" alt="Screenshot 2025-08-08 at 8 15 55 pm" src="https://github.com/user-attachments/assets/1d8ab9b4-b089-4671-b653-a294323e9b45" /> <img width="633" height="136" alt="Screenshot 2025-08-08 at 8 15 43 pm" src="https://github.com/user-attachments/assets/bef7b225-b833-403b-972a-3ed2e6914181" /> <img width="819" height="182" alt="Screenshot 2025-08-08 at 8 18 56 pm" src="https://github.com/user-attachments/assets/53933973-7362-42b3-9ecc-c9d25ca5d1c4" />
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#1100