Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Passkeys Webauthn?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adityaaatiwari-passkeys-webauthn-anvil)
---
name: passkeys-webauthn
description: Implement phishing-resistant WebAuthn passkeys safely with server challenges, origin binding, and account recovery paths
---
<!-- Generated by `anvil plugin build` from catalog/. Edit the catalog, not this file. -->
# Passkeys & WebAuthn
Use when adding FIDO2/WebAuthn passkey registration, passwordless sign-in, or phishing-resistant MFA.
## Ceremonies and verification
- Generate cryptographically random short-lived challenges on the server (`>= 128` bits), store them tied to a temporary challenge ID/session, and delete immediately after single verification use to stop replay.
- Verify `rpIdHash`, exact HTTPS `origin` allow-list, user verification flags (`UV`/`UP`), and challenge bytes strictly using maintained WebAuthn server libraries rather than custom CBOR checks.
- Store verified `credentialID`, COSE public key, transports, and sign count safely per user account; alert or reject anomalous signature counter regressions when non-zero.
## UX and recovery
- Provide multi-passkey support (phone + laptop), clean conditional UI autofill (`mediation: "conditional"`), and verified secondary recovery options rather than leaving users locked out after losing one device.
## Verify
Test challenge expiry, replayed assertions, mismatched origin/rpId rejections, and full registration + authentication flows with a WebAuthn virtual authenticator.