Passkey / WebAuthn Config Generator
Generate WebAuthn navigator.credentials.create() and navigator.credentials.get() option objects for passkey implementation. Configure your relying party, user details, FIDO2 algorithm preferences, attestation, resident key policy, and user verification — then copy the JSON or get a ready-to-use @simplewebauthn/server code snippet. Runs entirely in your browser.
Frequently Asked Questions
What is the difference between passkeys and passwords?▼
Passwords are shared secrets — you create one and the server stores a hash. They can be phished, leaked in breaches, or brute-forced. Passkeys use public-key cryptography: your device generates a key pair, stores the private key in a secure enclave (never leaves the device), and shares only the public key with the server. Authentication is a cryptographic challenge-response — there is nothing to phish or steal from the server, and passkeys are inherently phishing-resistant because they are scoped to a specific domain.
What is the difference between WebAuthn and FIDO2?▼
FIDO2 is the umbrella standard by the FIDO Alliance, composed of two specifications: WebAuthn (Web Authentication API, a W3C spec implemented by browsers) and CTAP (Client-to-Authenticator Protocol, which defines how browsers communicate with external authenticators like YubiKeys). When you implement 'passkeys' or 'WebAuthn' in a web app, you are building on FIDO2. Passkeys are a consumer-friendly brand name for discoverable FIDO2 credentials (resident keys) that can sync across devices via iCloud Keychain, Google Password Manager, or 1Password.
What are the rpId requirements and what happens if I get it wrong?▼
The rpId (Relying Party ID) must be a valid domain that is a registrable suffix of your origin. If your app is at 'app.example.com', valid rpIds are 'app.example.com' or 'example.com'. You cannot use an IP address or 'localhost' in production. If the rpId doesn't match, the browser will throw a SecurityError and the credential will not be created/used. Critically, credentials are permanently scoped to the rpId they were created with — you cannot migrate passkeys from one rpId to another, so choose carefully (typically your apex domain).
What is a resident key (discoverable credential) and why does it matter for passkeys?▼
A resident key (now called 'discoverable credential' in the spec) stores the credential on the authenticator itself rather than server-side. Without a resident key, you must pass 'allowCredentials' during authentication (requiring a username step to look up credentials). With a resident key, the authenticator can find the right credential automatically — enabling true passwordless flows where the user just touches their device without entering a username. For passkeys (the Apple/Google/Microsoft spec), residentKey: 'required' or 'preferred' is mandatory. Set it to 'required' for a pure passkey experience.
What does attestation mean and when should I request it?▼
Attestation is a cryptographic statement from the authenticator manufacturer proving what type of authenticator created the credential (e.g., 'this is a genuine YubiKey 5 NFC' or 'this came from an Apple Secure Enclave'). For most consumer apps, use attestation: 'none' — it maximizes compatibility and privacy (many platform authenticators anonymize attestation anyway). Use 'direct' attestation only for high-assurance enterprise scenarios (government, financial) where you need to verify the specific hardware model. Note that Apple's Touch ID and Face ID always return anonymized attestation regardless of your setting to protect user privacy.
How do I use @simplewebauthn/server and what do I need to store in the database?▼
Install @simplewebauthn/server and use generateRegistrationOptions() / verifyRegistrationResponse() for registration, and generateAuthenticationOptions() / verifyAuthenticationResponse() for sign-in. In your database, store per-credential: credentialID (unique identifier, base64url), credentialPublicKey (COSE-encoded public key bytes), counter (anti-replay, increment on each authentication), and the user association. The challenge must be stored temporarily (Redis or session) between generating options and verifying the response — never reuse challenges. Also store the AAGUID if you want to identify authenticator types.
Related Products
on GumroadDevToolkit Starter Kit
A ready-to-deploy developer tools website with 12 built-in tools. Astro + Preact + Tailwind. Deploy to Cloudflare Pages for free. Built-in SEO, dark mode, and ad-ready layout.
Buy on Gumroad →TypeScript Quick Reference Toolkit
5 practical reference files for TypeScript developers: cheatsheet, TS vs JS comparison, 20 utility types with real examples, tsconfig best practices template, and 15 common mistakes guide. Print it. Keep it on your desk.
Buy on Gumroad →Developer Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →You Might Also Need
HTTP Security Headers Generator
Generate HTTP security headers configuration for nginx and Apache. Configure HSTS, CSP, X-Frame-Options, Referrer-Policy, and more with toggle switches. Copy ready-to-use configs.
Open free tool →
HTTP Security Headers Checker
Paste HTTP response headers and get a checklist of security headers present or missing. Checks CSP, HSTS, X-Frame-Options, and more.
Open free tool →
Content Security Policy Builder
Visual CSP builder with all directives. Generate Content-Security-Policy headers with source expressions, nonces, and report endpoints.
Open free tool →
More Free Tools
Related Articles
Passkeys and WebAuthn Implementation Guide 2026: Browser Support & UX Patterns
Implement passkeys and WebAuthn in 2026: browser support matrix, registration and authentication flows, server-side verification, UX best practices, and library recommendations.
Authentication Security Tools 2026: Modern Auth Patterns, MFA, Passwordless, and OAuth2
Complete guide to authentication security tools in 2026. Covers Auth0, Clerk, NextAuth.js v5, JWT security, Passkeys/WebAuthn, TOTP authenticator apps, OAuth2/OIDC, session management, and building secure auth systems with Node.js and Python.
Web Authentication Patterns in 2026: OAuth, Passkeys, and JWT Best Practices
A complete guide to modern web authentication: OAuth 2.0/OIDC, Passkeys/WebAuthn, JWT best practices, session management, and MFA strategies for secure apps.
JWT Token Decoder: How to Debug Authentication Issues
Learn how to use a JWT token decoder to diagnose 401 errors, expired tokens, missing claims, and auth misconfiguration. Practical debugging guide with code examples.
JWT Decoder Online — Inspect JSON Web Tokens Instantly
JWT decoder online — paste any token to see the header, payload, expiry time, and claims decoded in seconds. No library required. Learn how JWT works with code examples.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →