Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
csc3213-2026-group-b avatar

Simplewebauthn

  • 1 installs
  • Updated June 16, 2026
  • csc3213-2026-group-b/agent-skills

Helps with ai & agent building tasks.

About

simplewebauthn is a Claude Code skill for ai & agent building. It helps you ship faster with AI-assisted development.

  • simplewebauthn
  • AI & Agent Building
  • AI-coding skill

Simplewebauthn by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #14,102 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Data as of Jul 7, 2026 (Skillselion catalog sync)
npx skills add https://github.com/csc3213-2026-group-b/agent-skills --skill simplewebauthn

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Last updatedJune 16, 2026
Repositorycsc3213-2026-group-b/agent-skills

What it does

Helps with ai & agent building tasks.

Files

SKILL.mdMarkdownGitHub ↗

SimpleWebAuthn Skill

Use this skill for any WebAuthn or passkey implementation built on SimpleWebAuthn. The docs in this folder are the source of truth:

Use this skill for WebAuthn/passkey implementation work based on the SimpleWebAuthn docs in this folder. The goal: give concise, actionable recipes the model can use when asked to implement or debug server and browser-side WebAuthn flows.

  • Philosophy

Docs in this folder (source of truth):

  • Intro
  • Philosophy
  • Server guide
  • Browser guide
  • Types
  • Passkeys guidance
  • Custom challenges
  • Supported devices
  • Browser quirks
  • Example project
  • @simplewebauthn/server
  • @simplewebauthn/browser

Use this skill when code imports from @simplewebauthn/server or @simplewebauthn/browser. Use when user asks about "WebAuthn", "passkeys", "FIDO2", or "conditional create/UI".

  • Custom Challenges
  • Supported Devices
  • Browser Quirks
  • Example Project

Core Workflow

SimpleWebAuthn splits WebAuthn into two halves:

1. The server generates options and verifies responses. 2. The browser calls startRegistration() or startAuthentication() and forwards the authenticator response back to the server.

The library handles the JSON and ArrayBuffer conversion details for you. Prefer its helpers over hand-rolling WebAuthn encoding or decoding.

Registration

Use generateRegistrationOptions() to create options, then send them to startRegistration().

After the browser returns a response, verify it with verifyRegistrationResponse() and store the resulting credential data.

Persist at least:

  • credential id
  • publicKey
  • counter
  • transports
  • credentialDeviceType
  • credentialBackedUp
  • the WebAuthn user ID used to create the credential

Use discoverable credentials (residentKey required/preferred) and user verification preferences to enable passkey UX. For passkey-first login, set allowCredentials: [] so the browser can present any discoverable credential. Store transports, credentialDeviceType, and credentialBackedUp to understand adoption and enable cross-device UX.

  • attestationType: 'none'
  • authenticatorSelection.residentKey: 'preferred' for general passkey support, or 'required' for discoverable credentials

Persist challenge between options generation and verification (session cookie, Redis keyed by sessionID). Delete the stored challenge after verification to prevent replay. For advanced uses, expectedChallenge can be a function (or async) that validates embedded data. If you need browser hints, preferredAuthenticatorType overrides authenticatorSelection.authenticatorAttachment.

Node crypto or algorithm errors: older Node runtimes can mishandle OKP/Ed25519; if necessary, exclude -8 from supportedAlgorithmIDs and re-register. If verification throws algorithm/OKP errors in Firefox, re-generate credentials without Ed25519. Use generateAuthenticationOptions() to create options, then pass them to startAuthentication().

Endpoint: GET /generate-registration-options Endpoint: POST /verify-registration Endpoint: GET /generate-authentication-options Endpoint: POST /verify-authentication Persistent store for challenges DB table for passkeys with id, publicKey, counter, transports, webauthnUserID For passkey-friendly flows, favor:

If you want narrower guidance (server-only, browser-only, or passkey-only), I can create separate SKILL.md files for simplewebauthn-server, simplewebauthn-browser, and simplewebauthn-passkeys that focus on their respective recipes and triggers.

  • user verification when appropriate
  • storing transports for future authentications
  • handling multi-device credentials and backed-up credentials as first-class cases

On the server, passkeys usually mean a platform-authenticator or synced-credential flow, not a separate API.

Browser Guidance

@simplewebauthn/browser is the preferred front-end integration point.

Use:

  • startRegistration() for credential creation
  • startAuthentication() for sign-in

It also supports:

  • conditional create / auto register
  • browser autofill / conditional UI
  • feature detection for WebAuthn support

Operational Notes

  • WebAuthn requires a secure context. localhost is acceptable for local development.
  • Multiple origins and multiple RP IDs can be verified by passing arrays to the server helpers.
  • If you need custom challenge logic, use the expectedChallenge hook rather than bypassing verification.
  • Keep the challenge value stable between generation and verification and delete it after use to avoid replay.

Troubleshooting

Watch for environment-specific crypto issues, especially older Node versions and Ed25519 / OKP compatibility problems. If verification fails with algorithm support errors, exclude -8 from supportedAlgorithmIDs and re-register affected authenticators.

Implementation Default

When asked to build or debug a SimpleWebAuthn feature, prefer a minimal ceremony with:

  • one endpoint to generate options
  • one endpoint to verify responses
  • persistent challenge storage
  • durable passkey records in the database
  • counter updates after successful authentication

If more detail is needed, consult the package docs above before proposing custom logic.

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.