Skip to content

fix: refuse to delete a user's last sign-in method #400

Closed

Description

@Bccorb

Why

Deleting the only passkey when no other method or recovery is set locks the user out.

What

  • Refuse the delete with a clear error when it would leave no way to sign in
  • Admin override with step-up and audit

Done when

No user-initiated action can leave an account with no way in.

Activity

  1. added this to the v0.20 milestone on Oct 13, 2026
  2. added
    P1Security work outside the FIDO2 track
    safeServes the safe promise: no lockout, no lock-in, honest
    v0.20Targets the v0.20 release
    on Oct 13, 2026
  3. added theissue type on Oct 13, 2026
  4. added
    v0.19Targets the v0.19 release
    and removed
    v0.20Targets the v0.20 release
    on Oct 17, 2026
  5. modified the milestones: v0.20, v0.19 on Oct 17, 2026
  6. Bccorb commented on Oct 17, 2026

    @Bccorb
    ContributorAuthor

    Already handled on main, found while working #433:

    • deleteCredential (src/controllers/user.ts) refuses to delete a user's last credential with 400 You must keep at least one credential., so no user action can remove their only passkey.
    • The admin override the issue asks for exists as device replacement recovery (POST /admin/users/{userId}/recovery/device-replacement), which requires admin:write plus step-up and records identity proofing in the audit trail.

    The adjacent gap, removing the last admin, is fixed in #433. Policy changes that could strand users are #402 and #403 (v0.20).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Security work outside the FIDO2 tracksafeServes the safe promise: no lockout, no lock-in, honestv0.19Targets the v0.19 release

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions