{
    "componentChunkName": "component---src-pages-blog-markdown-remark-fields-slug-js",
    "path": "/blog/passkey-examples",
    "result": {"data":{"markdownRemark":{"html":"<p>Passkeys deliver frictionless, phishing-resistant login experiences across platforms, with <a href=\"https://www.biometricupdate.com/202501/state-of-passkeys-2025-passkeys-move-to-mainstream\" target=\"_blank\" rel=\"nofollow\">more than 1 billion people worldwide having activated at least one passkey as of January 2025</a>. This guide provides an end-to-end tour of passkeys in action — examining how major platforms like Apple, Google, and Coinbase implement passwordless login; exploring practical code examples across different programming languages; and demonstrating how to properly name, register, and authenticate with passkeys in your own applications.</p>\n<p>Whether you’re a developer evaluating passkey implementation for your application or a technology decision-maker assessing <a href=\"https://supertokens.com/blog/what-is-passwordless-authentication\" target=\"_blank\" rel=\"nofollow\">passwordless authentication</a> strategies, this comprehensive resource covers real-world examples, technical implementation details, and best practices that make passkey deployment successful.</p>\n<h2 id=\"what-is-a-passkey\" style=\"position:relative;\"><a href=\"#what-is-a-passkey\" aria-label=\"what is a passkey permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>What Is a Passkey?</strong></h2>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 630px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/656226a1cfa2b3357f1945c24c0de93e/ac25d/How-does-passkey-work.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 66.45569620253164%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAANCAIAAAAmMtkJAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB5ElEQVQoz31Sy44SQRTlM8cFgX9xY0z8DkjUJZNoQmYxgBhpA7QIdBcghNiRftSjX/W+prvGjcnMSW6t7rl1z7mnAwCEkDiOq6oCAGvhBSilgiBACHHOAaAjpfR9P4oi3/cxxtba3Xbned5yufQW3nw+3/zYTCfT1XIFABjjbrfb7/f3+31DFkKs12uE0GKxCMNQKS2ELIqiqirGGKWUMVa2AIAMZ3ev7nq9HkKoIQOAMUYIwRgLgsC8uLdW6na7Rb+juq4bsm102uv1WhRFq9kqpQghuKnmoS24ENbaNEkOCP3cbM6nX4Lzzn+zOedKKUpImiRZlmGM3fJSSs654NwYAwBSSq31E9kYY9uFy7Lkda20kkKURV7mrB2npZSUsma6EBnGjtUJw5AyNhwOx+Ox8zNN05wxLmSM2Z+UlrUs8hy3AACE0GAwcDfqOKkfP7z/7nkAwFhelaUBsHGYf35L71+rw6MBELx2nZfLZTQauW86TsNytb7FMQAURc4oVdpwlu3nn3bTexqdLECe54QQAKCUHo9HZ23rdk10ctTpGRSvqlprBQBxkk2/Lh6/fDudr05hXddKKXdzF8fGMBU+8PEb/vDOJAehwRj9XDaLopzNZpPJdLvdPcXzuUjYf3iu4S9bzddqbbnwHAAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"How does passkey work\"\n        title=\"How does passkey work\"\n        src=\"/static/656226a1cfa2b3357f1945c24c0de93e/f058b/How-does-passkey-work.png\"\n        srcset=\"/static/656226a1cfa2b3357f1945c24c0de93e/c26ae/How-does-passkey-work.png 158w,\n/static/656226a1cfa2b3357f1945c24c0de93e/6bdcf/How-does-passkey-work.png 315w,\n/static/656226a1cfa2b3357f1945c24c0de93e/f058b/How-does-passkey-work.png 630w,\n/static/656226a1cfa2b3357f1945c24c0de93e/40601/How-does-passkey-work.png 945w,\n/static/656226a1cfa2b3357f1945c24c0de93e/78612/How-does-passkey-work.png 1260w,\n/static/656226a1cfa2b3357f1945c24c0de93e/ac25d/How-does-passkey-work.png 2342w\"\n        sizes=\"(max-width: 630px) 100vw, 630px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p><strong>A passkey is a cryptographic credential</strong> stored securely on a user’s device that enables passwordless login to websites and applications. Unlike traditional passwords composed of letters, numbers, and symbols,\npasskeys use public-key cryptography to create unique authentication credentials that cannot be guessed, phished, or stolen through data breaches.</p>\n<p><strong>How passkeys work</strong> relies on asymmetric cryptography, where a private key remains securely stored on the user’s device while the corresponding public key resides on the server. During authentication, the device uses the private key to sign a challenge from the server, proving possession without ever transmitting the private key itself. This architecture fundamentally eliminates password-related vulnerabilities, including phishing attacks, credential stuffing, and database breaches exposing user credentials.</p>\n<p>The passkey authentication flow occurs nearly instantaneously, typically requiring only biometric verification like Face ID, Touch ID, or fingerprint recognition — the same gesture users already perform to\nunlock their devices. This seamless experience combines enhanced security with superior usability compared to traditional password-based authentication.</p>\n<h2 id=\"what-are-common-passkey-examples\" style=\"position:relative;\"><a href=\"#what-are-common-passkey-examples\" aria-label=\"what are common passkey examples permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>What Are Common Passkey Examples?</strong></h2>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 630px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/380d8b681ac26246803f9194e64e1eff/8108a/Passkey-example.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 56.32911392405063%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAALCAIAAADwazoUAAAACXBIWXMAABYlAAAWJQFJUiTwAAAB6UlEQVQozyVSyW7bMBDV/39CDj30E3pIW/SUIigCtAhqOIvj2Fooi5QocRXJ4ZByUKi6DR5m8LYpEDHGCAA5p0Hq3Zk4H1JKG+6932bEyLVjNgpjl5zzf7BAxJzSx3VJGH8fzje3d90olpwjIgB457R1XCrjQVzKefd1UtoFmLRdj1PCdpgeXk5cKKk1F9LOM25cMWpjhJ3zsjRcCnKw9585u1Chq44BQJFT2pftp+/3VceC903PuRAAsDJHcPPccFUdd4ocmAnjDFxqoZR++4Xgi5QSV6rtx56PzrsvD39rxq8Zl5xX2d4BJm8kzrIXsmaDsRYAMMaEsXA+nLv+jdBRCKXUsbl0fKy6nksdY3TOuRDU7PXsY4yz98LYURlu3GRD4QP83B+//XmSxlhrg/d1x25u7348viCiNqab1KQ0H2jOecmJS6086pFp8loEgKeq3Z0a58OW/KTtoekqygOAtfZMx7qpXfWI+RpjjBjrYSqrMolLkRC3JgnjTc/PF8Ym+XFdNs/OuZwTHWVJeU0HMoxNzys6OIhpWYqc8yDUkXQvVftckte6fSrJc9mKtck4O7cmKvVb0+1Pzeu60x4Jtc6tga2p+ND0/NSysusbxo+E0lEAxO3DNi9c6nfC3gmt6BAANrH/ACtDY6KAW8GJAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Passkey example\"\n        title=\"Passkey example\"\n        src=\"/static/380d8b681ac26246803f9194e64e1eff/f058b/Passkey-example.png\"\n        srcset=\"/static/380d8b681ac26246803f9194e64e1eff/c26ae/Passkey-example.png 158w,\n/static/380d8b681ac26246803f9194e64e1eff/6bdcf/Passkey-example.png 315w,\n/static/380d8b681ac26246803f9194e64e1eff/f058b/Passkey-example.png 630w,\n/static/380d8b681ac26246803f9194e64e1eff/40601/Passkey-example.png 945w,\n/static/380d8b681ac26246803f9194e64e1eff/78612/Passkey-example.png 1260w,\n/static/380d8b681ac26246803f9194e64e1eff/8108a/Passkey-example.png 2739w\"\n        sizes=\"(max-width: 630px) 100vw, 630px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<h3 id=\"apple-passkey-example\" style=\"position:relative;\"><a href=\"#apple-passkey-example\" aria-label=\"apple passkey example permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Apple Passkey Example</strong></h3>\n<p>Apple has integrated passkey support comprehensively across iOS, iPadOS, and macOS, enabling users to authenticate by using Face ID or Touch ID without passwords. A typical scenario involves accessing a banking application on an iPhone where, instead of entering a password, Face ID verifies the user’s identity, and the passkey authenticates automatically with the server.</p>\n<p>Apple promotes passkeys through Safari and iCloud Keychain,with iOS 18 introducing new APIs that allow developers to create passkeys automatically for users. This native platform support means passkeys sync securely across all Apple devices through iCloud Keychain, enabling seamless authentication whether using an iPhone, iPad, or Mac laptop.</p>\n<h3 id=\"google-passkey-example\" style=\"position:relative;\"><a href=\"#google-passkey-example\" aria-label=\"google passkey example permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Google Passkey Example</strong></h3>\n<p>Google has made passkeys available and even the default for Google accounts, calling passkey adoption “the beginning of the end” for passwords. Chrome’s built-in credential management enables users to sign into Gmail and other Google services by using passkeys stored in Google Password Manager.</p>\n<p>The integration extends across Android devices, where users can authenticate by using fingerprint sensors or face unlock, with passkeys synchronizing through Google Password Manager for cross-device compatibility. This ecosystem-wide support demonstrates Google’s commitment to passwordless authentication as the future standard.</p>\n<h3 id=\"coinbase-passkey-example\" style=\"position:relative;\"><a href=\"#coinbase-passkey-example\" aria-label=\"coinbase passkey example permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Coinbase Passkey Example</strong></h3>\n<p>Cryptocurrency exchanges like Coinbase rank highly in passkey adoption due to the critical importance of security for platforms managing digital assets worth billions. Coinbase supports biometric login through\npasskeys in both mobile applications and web browsers, allowing users to access their accounts by using Face ID, fingerprint authentication, or device PINs.</p>\n<p>The Coinbase Smart Wallet implementation demonstrates advanced passkey usage where the passkey itself protects access to blockchain wallets. Users create passkeys that verify ownership without managing complex seed phrases, combining enterprise-grade security with a simplified user\nexperience. Coinbase’s passkey implementation includes support for multiple devices and browsers, catering to technically sophisticated users while maintaining accessibility.</p>\n<h3 id=\"passkey-login-example-on-websites\" style=\"position:relative;\"><a href=\"#passkey-login-example-on-websites\" aria-label=\"passkey login example on websites permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Passkey Login Example on Websites</strong></h3>\n<p>Modern websites implement passkey authentication through the WebAuthn API, creating flows where users click login buttons and immediately receive biometric prompts. A typical implementation in React or plain HTML triggers <code class=\"language-text\">navigator.credentials.get()</code>, which prompts the browser’s native passkey interface.</p>\n<p>The user experience feels identical to unlocking a smartphone — tap the login button, authenticate with biometrics, and gain immediate access. No password typing, no remembering complex credentials, and no vulnerability to phishing attacks that might capture traditional login\ncredentials.</p>\n<h3 id=\"passkey-example-iphone\" style=\"position:relative;\"><a href=\"#passkey-example-iphone\" aria-label=\"passkey example iphone permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Passkey Example iPhone</strong></h3>\n<p>Safari on iPhone displays prompts like “Use Passkey for example.com” when users visit sites offering passkey authentication. The seamless integration means iOS handles passkey storage through iCloud Keychain, automatically syncing across devices and prompting for Face ID or Touch\nID when authentication is required.</p>\n<p>This native implementation requires no additional apps or configuration — users simply authenticate as they normally would to unlock their device, with the passkey authentication occurring transparently in the background.</p>\n<h2 id=\"how-to-choose-a-passkey-name-and-nickname\" style=\"position:relative;\"><a href=\"#how-to-choose-a-passkey-name-and-nickname\" aria-label=\"how to choose a passkey name and nickname permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>How to Choose a Passkey Name and Nickname</strong></h2>\n<h3 id=\"passkey-name-example\" style=\"position:relative;\"><a href=\"#passkey-name-example\" aria-label=\"passkey name example permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Passkey Name Example</strong></h3>\n<p>Clear, descriptive passkey names help users manage multiple credentials across different devices. A passkey name like “My MacBook Pro” immediately identifies which device the credential resides on, preventing confusion when selecting from multiple available passkeys.</p>\n<p>For example, Coinbase Smart Wallet automatically generates passkey names by using creation dates like “Smart Wallet 6/16/2024,” providing temporal context that helps users track when credentials were established. This naming convention becomes particularly valuable when users need to identify and remove outdated passkeys.</p>\n<h3 id=\"passkey-nickname-example\" style=\"position:relative;\"><a href=\"#passkey-nickname-example\" aria-label=\"passkey nickname example permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Passkey Nickname Example</strong></h3>\n<p>User-assigned nicknames provide additional context beyond device identification. Examples like “Work iPhone” versus “Home iPad” distinguish devices used in different contexts, while nicknames like “Main Laptop” or “Backup Device” indicate primary versus secondary credentials.</p>\n<p>Effective nickname strategies combine device type, location, and usage context: “Office Desktop - Engineering,” “Personal iPhone 15,” or “Travel Tablet.” This specificity reduces authentication friction when\nselecting the appropriate passkey from multiple available options.</p>\n<h3 id=\"best-practices\" style=\"position:relative;\"><a href=\"#best-practices\" aria-label=\"best practices permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Best Practices</strong></h3>\n<ul>\n<li><strong>Keep names descriptive but concise</strong> to ensure readability in selection interfaces that may display passkeys in compact lists. Names exceeding 20-30 characters risk truncation in user interfaces, potentially obscuring distinguishing information.</li>\n<li><strong>Include device type and context</strong> to create instantly recognizable identifiers. “MacBook” alone provides less context than “MacBook Pro - Personal,” which clarifies both device and usage.</li>\n<li><strong>Update names when circumstances change</strong>, such as when transitioning devices between work and personal use, or when replacing hardware. Stale passkey names create confusion that undermines the security benefits of multi-device authentication.</li>\n</ul>\n<h2 id=\"how-to-implement-a-passkey-login-flow\" style=\"position:relative;\"><a href=\"#how-to-implement-a-passkey-login-flow\" aria-label=\"how to implement a passkey login flow permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>How to Implement a Passkey Login Flow</strong></h2>\n<h3 id=\"register-a-passkey-webauthn-create\" style=\"position:relative;\"><a href=\"#register-a-passkey-webauthn-create\" aria-label=\"register a passkey webauthn create permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Register a Passkey (WebAuthn Create)</strong></h3>\n<p>Registration begins by calling <code class=\"language-text\">navigator.credentials.create()</code> with options containing a server-generated challenge, relying party information, and user details:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"67630167260553040000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`const registrationOptions = await fetch('/passkey/register/options', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application/json' },\n    body: JSON.stringify({ userId: currentUser.id })\n});\nconst options = await registrationOptions.json();\n\n// Create passkey credential\nconst credential = await navigator.credentials.create({\n    publicKey: {\n        challenge: Uint8Array.from(options.challenge, c => c.charCodeAt(0)),\n        rp: {\n            name: &quot;Your Application&quot;,\n            id: &quot;yourdomain.com&quot;\n        },\n        user: {\n            id: Uint8Array.from(options.user.id, c => c.charCodeAt(0)),\n            name: options.user.email,\n            displayName: options.user.displayName\n        },\n        pubKeyCredParams: [\n            { alg: -7, type: &quot;public-key&quot; },\n            { alg: -257, type: &quot;public-key&quot; }\n        ],\n        authenticatorSelection: {\n            authenticatorAttachment: &quot;platform&quot;,\n            userVerification: &quot;required&quot;\n        },\n        timeout: 60000\n    }\n});`, `67630167260553040000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\"><span class=\"token keyword\">const</span> registrationOptions <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> <span class=\"token function\">fetch</span><span class=\"token punctuation\">(</span><span class=\"token string\">'/passkey/register/options'</span><span class=\"token punctuation\">,</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token literal-property property\">method</span><span class=\"token operator\">:</span> <span class=\"token string\">'POST'</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">headers</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span> <span class=\"token string-property property\">'Content-Type'</span><span class=\"token operator\">:</span> <span class=\"token string\">'application/json'</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">body</span><span class=\"token operator\">:</span> <span class=\"token constant\">JSON</span><span class=\"token punctuation\">.</span><span class=\"token function\">stringify</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span> <span class=\"token literal-property property\">userId</span><span class=\"token operator\">:</span> currentUser<span class=\"token punctuation\">.</span>id <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> options <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> registrationOptions<span class=\"token punctuation\">.</span><span class=\"token function\">json</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// Create passkey credential</span>\n<span class=\"token keyword\">const</span> credential <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> navigator<span class=\"token punctuation\">.</span>credentials<span class=\"token punctuation\">.</span><span class=\"token function\">create</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n    <span class=\"token literal-property property\">publicKey</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n        <span class=\"token literal-property property\">challenge</span><span class=\"token operator\">:</span> Uint8Array<span class=\"token punctuation\">.</span><span class=\"token function\">from</span><span class=\"token punctuation\">(</span>options<span class=\"token punctuation\">.</span>challenge<span class=\"token punctuation\">,</span> <span class=\"token parameter\">c</span> <span class=\"token operator\">=></span> c<span class=\"token punctuation\">.</span><span class=\"token function\">charCodeAt</span><span class=\"token punctuation\">(</span><span class=\"token number\">0</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">rp</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n            <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Your Application\"</span><span class=\"token punctuation\">,</span>\n            <span class=\"token literal-property property\">id</span><span class=\"token operator\">:</span> <span class=\"token string\">\"yourdomain.com\"</span>\n        <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">user</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n            <span class=\"token literal-property property\">id</span><span class=\"token operator\">:</span> Uint8Array<span class=\"token punctuation\">.</span><span class=\"token function\">from</span><span class=\"token punctuation\">(</span>options<span class=\"token punctuation\">.</span>user<span class=\"token punctuation\">.</span>id<span class=\"token punctuation\">,</span> <span class=\"token parameter\">c</span> <span class=\"token operator\">=></span> c<span class=\"token punctuation\">.</span><span class=\"token function\">charCodeAt</span><span class=\"token punctuation\">(</span><span class=\"token number\">0</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n            <span class=\"token literal-property property\">name</span><span class=\"token operator\">:</span> options<span class=\"token punctuation\">.</span>user<span class=\"token punctuation\">.</span>email<span class=\"token punctuation\">,</span>\n            <span class=\"token literal-property property\">displayName</span><span class=\"token operator\">:</span> options<span class=\"token punctuation\">.</span>user<span class=\"token punctuation\">.</span>displayName\n        <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">pubKeyCredParams</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n            <span class=\"token punctuation\">{</span> <span class=\"token literal-property property\">alg</span><span class=\"token operator\">:</span> <span class=\"token operator\">-</span><span class=\"token number\">7</span><span class=\"token punctuation\">,</span> <span class=\"token literal-property property\">type</span><span class=\"token operator\">:</span> <span class=\"token string\">\"public-key\"</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n            <span class=\"token punctuation\">{</span> <span class=\"token literal-property property\">alg</span><span class=\"token operator\">:</span> <span class=\"token operator\">-</span><span class=\"token number\">257</span><span class=\"token punctuation\">,</span> <span class=\"token literal-property property\">type</span><span class=\"token operator\">:</span> <span class=\"token string\">\"public-key\"</span> <span class=\"token punctuation\">}</span>\n        <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">authenticatorSelection</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n            <span class=\"token literal-property property\">authenticatorAttachment</span><span class=\"token operator\">:</span> <span class=\"token string\">\"platform\"</span><span class=\"token punctuation\">,</span>\n            <span class=\"token literal-property property\">userVerification</span><span class=\"token operator\">:</span> <span class=\"token string\">\"required\"</span>\n        <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">timeout</span><span class=\"token operator\">:</span> <span class=\"token number\">60000</span>\n    <span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<h3 id=\"store-public-key-on-server\" style=\"position:relative;\"><a href=\"#store-public-key-on-server\" aria-label=\"store public key on server permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Store Public Key on Server</strong></h3>\n<p>After credential creation, extract and transmit the public key and credential ID to your server for storage:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"59631292766621710000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`// Send credential to server for storage\nconst response = await fetch('/passkey/register/verify', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application/json' },\n    body: JSON.stringify({\n        id: credential.id,\n        rawId: btoa(String.fromCharCode(...new Uint8Array(credential.rawId))),\n        response: {\n            clientDataJSON: btoa(String.fromCharCode(...new Uint8Array(credential.response.clientDataJSON))),\n            attestationObject: btoa(String.fromCharCode(...new Uint8Array(credential.response.attestationObject)))\n        },\n        type: credential.type\n    })\n});\nconst result = await response.json();\nif (result.verified) {\n    console.log('Passkey registered successfully');\n}`, `59631292766621710000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\"><span class=\"token comment\">// Send credential to server for storage</span>\n<span class=\"token keyword\">const</span> response <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> <span class=\"token function\">fetch</span><span class=\"token punctuation\">(</span><span class=\"token string\">'/passkey/register/verify'</span><span class=\"token punctuation\">,</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token literal-property property\">method</span><span class=\"token operator\">:</span> <span class=\"token string\">'POST'</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">headers</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span> <span class=\"token string-property property\">'Content-Type'</span><span class=\"token operator\">:</span> <span class=\"token string\">'application/json'</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">body</span><span class=\"token operator\">:</span> <span class=\"token constant\">JSON</span><span class=\"token punctuation\">.</span><span class=\"token function\">stringify</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n        <span class=\"token literal-property property\">id</span><span class=\"token operator\">:</span> credential<span class=\"token punctuation\">.</span>id<span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">rawId</span><span class=\"token operator\">:</span> <span class=\"token function\">btoa</span><span class=\"token punctuation\">(</span>String<span class=\"token punctuation\">.</span><span class=\"token function\">fromCharCode</span><span class=\"token punctuation\">(</span><span class=\"token operator\">...</span><span class=\"token keyword\">new</span> <span class=\"token class-name\">Uint8Array</span><span class=\"token punctuation\">(</span>credential<span class=\"token punctuation\">.</span>rawId<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">response</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n            <span class=\"token literal-property property\">clientDataJSON</span><span class=\"token operator\">:</span> <span class=\"token function\">btoa</span><span class=\"token punctuation\">(</span>String<span class=\"token punctuation\">.</span><span class=\"token function\">fromCharCode</span><span class=\"token punctuation\">(</span><span class=\"token operator\">...</span><span class=\"token keyword\">new</span> <span class=\"token class-name\">Uint8Array</span><span class=\"token punctuation\">(</span>credential<span class=\"token punctuation\">.</span>response<span class=\"token punctuation\">.</span>clientDataJSON<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n            <span class=\"token literal-property property\">attestationObject</span><span class=\"token operator\">:</span> <span class=\"token function\">btoa</span><span class=\"token punctuation\">(</span>String<span class=\"token punctuation\">.</span><span class=\"token function\">fromCharCode</span><span class=\"token punctuation\">(</span><span class=\"token operator\">...</span><span class=\"token keyword\">new</span> <span class=\"token class-name\">Uint8Array</span><span class=\"token punctuation\">(</span>credential<span class=\"token punctuation\">.</span>response<span class=\"token punctuation\">.</span>attestationObject<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span>\n        <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">type</span><span class=\"token operator\">:</span> credential<span class=\"token punctuation\">.</span>type\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> result <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> response<span class=\"token punctuation\">.</span><span class=\"token function\">json</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">if</span> <span class=\"token punctuation\">(</span>result<span class=\"token punctuation\">.</span>verified<span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n    console<span class=\"token punctuation\">.</span><span class=\"token function\">log</span><span class=\"token punctuation\">(</span><span class=\"token string\">'Passkey registered successfully'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n<p>Server-side storage associates the public key with the user’s account, enabling future authentication verification.</p>\n<h3 id=\"authenticate-with-a-passkey-webauthn-get\" style=\"position:relative;\"><a href=\"#authenticate-with-a-passkey-webauthn-get\" aria-label=\"authenticate with a passkey webauthn get permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Authenticate with a Passkey (WebAuthn Get)</strong></h3>\n<p>Authentication requests credentials through <code class=\"language-text\">navigator.credentials.get()</code> by using a server-provided challenge and a list of acceptable credential IDs:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"89842317275719580000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`// Request authentication options from server\nconst authOptions = await fetch('/passkey/login/options', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application/json' },\n    body: JSON.stringify({ username: userEmail })\n});\nconst options = await authOptions.json();\n\n// Get passkey credential\nconst assertion = await navigator.credentials.get({\n    publicKey: {\n        challenge: Uint8Array.from(options.challenge, c => c.charCodeAt(0)),\n        allowCredentials: options.allowCredentials.map(cred => ({\n            id: Uint8Array.from(atob(cred.id), c => c.charCodeAt(0)),\n            type: 'public-key'\n        })),\n        userVerification: &quot;required&quot;,\n        timeout: 60000\n    }\n});`, `89842317275719580000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\"><span class=\"token comment\">// Request authentication options from server</span>\n<span class=\"token keyword\">const</span> authOptions <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> <span class=\"token function\">fetch</span><span class=\"token punctuation\">(</span><span class=\"token string\">'/passkey/login/options'</span><span class=\"token punctuation\">,</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token literal-property property\">method</span><span class=\"token operator\">:</span> <span class=\"token string\">'POST'</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">headers</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span> <span class=\"token string-property property\">'Content-Type'</span><span class=\"token operator\">:</span> <span class=\"token string\">'application/json'</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">body</span><span class=\"token operator\">:</span> <span class=\"token constant\">JSON</span><span class=\"token punctuation\">.</span><span class=\"token function\">stringify</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span> <span class=\"token literal-property property\">username</span><span class=\"token operator\">:</span> userEmail <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> options <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> authOptions<span class=\"token punctuation\">.</span><span class=\"token function\">json</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// Get passkey credential</span>\n<span class=\"token keyword\">const</span> assertion <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> navigator<span class=\"token punctuation\">.</span>credentials<span class=\"token punctuation\">.</span><span class=\"token function\">get</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n    <span class=\"token literal-property property\">publicKey</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n        <span class=\"token literal-property property\">challenge</span><span class=\"token operator\">:</span> Uint8Array<span class=\"token punctuation\">.</span><span class=\"token function\">from</span><span class=\"token punctuation\">(</span>options<span class=\"token punctuation\">.</span>challenge<span class=\"token punctuation\">,</span> <span class=\"token parameter\">c</span> <span class=\"token operator\">=></span> c<span class=\"token punctuation\">.</span><span class=\"token function\">charCodeAt</span><span class=\"token punctuation\">(</span><span class=\"token number\">0</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">allowCredentials</span><span class=\"token operator\">:</span> options<span class=\"token punctuation\">.</span>allowCredentials<span class=\"token punctuation\">.</span><span class=\"token function\">map</span><span class=\"token punctuation\">(</span><span class=\"token parameter\">cred</span> <span class=\"token operator\">=></span> <span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n            <span class=\"token literal-property property\">id</span><span class=\"token operator\">:</span> Uint8Array<span class=\"token punctuation\">.</span><span class=\"token function\">from</span><span class=\"token punctuation\">(</span><span class=\"token function\">atob</span><span class=\"token punctuation\">(</span>cred<span class=\"token punctuation\">.</span>id<span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span> <span class=\"token parameter\">c</span> <span class=\"token operator\">=></span> c<span class=\"token punctuation\">.</span><span class=\"token function\">charCodeAt</span><span class=\"token punctuation\">(</span><span class=\"token number\">0</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n            <span class=\"token literal-property property\">type</span><span class=\"token operator\">:</span> <span class=\"token string\">'public-key'</span>\n        <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">userVerification</span><span class=\"token operator\">:</span> <span class=\"token string\">\"required\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">timeout</span><span class=\"token operator\">:</span> <span class=\"token number\">60000</span>\n    <span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<h3 id=\"verify-assertion-on-server\" style=\"position:relative;\"><a href=\"#verify-assertion-on-server\" aria-label=\"verify assertion on server permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Verify Assertion on Server</strong></h3>\n<p>Server-side verification validates the signed assertion by using the stored public key:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"16213528292693492000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`// Send assertion to server for verification\nconst verifyResponse = await fetch('/passkey/login/verify', {\n    method: 'POST',\n    headers: { 'Content-Type': 'application/json' },\n    body: JSON.stringify({\n        id: assertion.id,\n        rawId: btoa(String.fromCharCode(...new Uint8Array(assertion.rawId))),\n        response: {\n            authenticatorData: btoa(String.fromCharCode(...new Uint8Array(assertion.response.authenticatorData))),\n            clientDataJSON: btoa(String.fromCharCode(...new Uint8Array(assertion.response.clientDataJSON))),\n            signature: btoa(String.fromCharCode(...new Uint8Array(assertion.response.signature))),\n            userHandle: assertion.response.userHandle\n                ? btoa(String.fromCharCode(...new Uint8Array(assertion.response.userHandle)))\n                : null\n        },\n        type: assertion.type\n    })\n});\nconst verifyResult = await verifyResponse.json();\nif (verifyResult.verified) {\n    window.location.href = '/dashboard';}`, `16213528292693492000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\"><span class=\"token comment\">// Send assertion to server for verification</span>\n<span class=\"token keyword\">const</span> verifyResponse <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> <span class=\"token function\">fetch</span><span class=\"token punctuation\">(</span><span class=\"token string\">'/passkey/login/verify'</span><span class=\"token punctuation\">,</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token literal-property property\">method</span><span class=\"token operator\">:</span> <span class=\"token string\">'POST'</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">headers</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span> <span class=\"token string-property property\">'Content-Type'</span><span class=\"token operator\">:</span> <span class=\"token string\">'application/json'</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">body</span><span class=\"token operator\">:</span> <span class=\"token constant\">JSON</span><span class=\"token punctuation\">.</span><span class=\"token function\">stringify</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n        <span class=\"token literal-property property\">id</span><span class=\"token operator\">:</span> assertion<span class=\"token punctuation\">.</span>id<span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">rawId</span><span class=\"token operator\">:</span> <span class=\"token function\">btoa</span><span class=\"token punctuation\">(</span>String<span class=\"token punctuation\">.</span><span class=\"token function\">fromCharCode</span><span class=\"token punctuation\">(</span><span class=\"token operator\">...</span><span class=\"token keyword\">new</span> <span class=\"token class-name\">Uint8Array</span><span class=\"token punctuation\">(</span>assertion<span class=\"token punctuation\">.</span>rawId<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">response</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n            <span class=\"token literal-property property\">authenticatorData</span><span class=\"token operator\">:</span> <span class=\"token function\">btoa</span><span class=\"token punctuation\">(</span>String<span class=\"token punctuation\">.</span><span class=\"token function\">fromCharCode</span><span class=\"token punctuation\">(</span><span class=\"token operator\">...</span><span class=\"token keyword\">new</span> <span class=\"token class-name\">Uint8Array</span><span class=\"token punctuation\">(</span>assertion<span class=\"token punctuation\">.</span>response<span class=\"token punctuation\">.</span>authenticatorData<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n            <span class=\"token literal-property property\">clientDataJSON</span><span class=\"token operator\">:</span> <span class=\"token function\">btoa</span><span class=\"token punctuation\">(</span>String<span class=\"token punctuation\">.</span><span class=\"token function\">fromCharCode</span><span class=\"token punctuation\">(</span><span class=\"token operator\">...</span><span class=\"token keyword\">new</span> <span class=\"token class-name\">Uint8Array</span><span class=\"token punctuation\">(</span>assertion<span class=\"token punctuation\">.</span>response<span class=\"token punctuation\">.</span>clientDataJSON<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n            <span class=\"token literal-property property\">signature</span><span class=\"token operator\">:</span> <span class=\"token function\">btoa</span><span class=\"token punctuation\">(</span>String<span class=\"token punctuation\">.</span><span class=\"token function\">fromCharCode</span><span class=\"token punctuation\">(</span><span class=\"token operator\">...</span><span class=\"token keyword\">new</span> <span class=\"token class-name\">Uint8Array</span><span class=\"token punctuation\">(</span>assertion<span class=\"token punctuation\">.</span>response<span class=\"token punctuation\">.</span>signature<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">,</span>\n            <span class=\"token literal-property property\">userHandle</span><span class=\"token operator\">:</span> assertion<span class=\"token punctuation\">.</span>response<span class=\"token punctuation\">.</span>userHandle\n                <span class=\"token operator\">?</span> <span class=\"token function\">btoa</span><span class=\"token punctuation\">(</span>String<span class=\"token punctuation\">.</span><span class=\"token function\">fromCharCode</span><span class=\"token punctuation\">(</span><span class=\"token operator\">...</span><span class=\"token keyword\">new</span> <span class=\"token class-name\">Uint8Array</span><span class=\"token punctuation\">(</span>assertion<span class=\"token punctuation\">.</span>response<span class=\"token punctuation\">.</span>userHandle<span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span>\n                <span class=\"token operator\">:</span> <span class=\"token keyword\">null</span>\n        <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">type</span><span class=\"token operator\">:</span> assertion<span class=\"token punctuation\">.</span>type\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> verifyResult <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> verifyResponse<span class=\"token punctuation\">.</span><span class=\"token function\">json</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">if</span> <span class=\"token punctuation\">(</span>verifyResult<span class=\"token punctuation\">.</span>verified<span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n    window<span class=\"token punctuation\">.</span>location<span class=\"token punctuation\">.</span>href <span class=\"token operator\">=</span> <span class=\"token string\">'/dashboard'</span><span class=\"token punctuation\">;</span><span class=\"token punctuation\">}</span></code></pre></div>\n<p>Successful verification confirms the user possesses the private key corresponding to the stored public key, thus completing passwordless authentication.</p>\n<h2 id=\"passkey-implementation-examples-in-code\" style=\"position:relative;\"><a href=\"#passkey-implementation-examples-in-code\" aria-label=\"passkey implementation examples in code permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Passkey Implementation Examples in Code</strong></h2>\n<h3 id=\"php-passkey-example\" style=\"position:relative;\"><a href=\"#php-passkey-example\" aria-label=\"php passkey example permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>PHP Passkey Example</strong></h3>\n<p>PHP developers can implement WebAuthn by using the <code class=\"language-text\">web-auth/webauthn-lib</code> library:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"1042077635830640500\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`<?php\nuse Webauthn\\Server;\nuse Webauthn\\PublicKeyCredentialRpEntity;\nuse Webauthn\\PublicKeyCredentialUserEntity;\n\n// Initialize WebAuthn server\n\\$rpEntity = new PublicKeyCredentialRpEntity('Your Application','yourdomain.com');\n\\$server = new Server(\\$rpEntity,\\$credentialRepository,null);\n\n// Registration\n\\$userEntity = new PublicKeyCredentialUserEntity('user@example.com',\\$userId,'John Doe');\n\\$publicKeyCredentialCreationOptions = \\$server->generatePublicKeyCredentialCreationOptions(\n    \\$userEntity,\n    PublicKeyCredentialCreationOptions::ATTESTATION_CONVEYANCE_PREFERENCE_NONE,\n    [],\n    null\n);\n\n// Store options in session for verification\n\\$_SESSION['registration_challenge'] = \\$publicKeyCredentialCreationOptions;\n\n// Return options to client\necho json_encode(\\$publicKeyCredentialCreationOptions);`, `1042077635830640500`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"php\"><pre class=\"language-php\"><code class=\"language-php\"><span class=\"token php language-php\"><span class=\"token delimiter important\">&lt;?php</span>\n<span class=\"token keyword\">use</span> <span class=\"token package\">Webauthn<span class=\"token punctuation\">\\</span>Server</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">use</span> <span class=\"token package\">Webauthn<span class=\"token punctuation\">\\</span>PublicKeyCredentialRpEntity</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">use</span> <span class=\"token package\">Webauthn<span class=\"token punctuation\">\\</span>PublicKeyCredentialUserEntity</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// Initialize WebAuthn server</span>\n<span class=\"token variable\">$rpEntity</span> <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">PublicKeyCredentialRpEntity</span><span class=\"token punctuation\">(</span><span class=\"token string single-quoted-string\">'Your Application'</span><span class=\"token punctuation\">,</span><span class=\"token string single-quoted-string\">'yourdomain.com'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token variable\">$server</span> <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">Server</span><span class=\"token punctuation\">(</span><span class=\"token variable\">$rpEntity</span><span class=\"token punctuation\">,</span><span class=\"token variable\">$credentialRepository</span><span class=\"token punctuation\">,</span><span class=\"token constant\">null</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// Registration</span>\n<span class=\"token variable\">$userEntity</span> <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token class-name\">PublicKeyCredentialUserEntity</span><span class=\"token punctuation\">(</span><span class=\"token string single-quoted-string\">'user@example.com'</span><span class=\"token punctuation\">,</span><span class=\"token variable\">$userId</span><span class=\"token punctuation\">,</span><span class=\"token string single-quoted-string\">'John Doe'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token variable\">$publicKeyCredentialCreationOptions</span> <span class=\"token operator\">=</span> <span class=\"token variable\">$server</span><span class=\"token operator\">-></span><span class=\"token function\">generatePublicKeyCredentialCreationOptions</span><span class=\"token punctuation\">(</span>\n    <span class=\"token variable\">$userEntity</span><span class=\"token punctuation\">,</span>\n    <span class=\"token class-name static-context\">PublicKeyCredentialCreationOptions</span><span class=\"token operator\">::</span><span class=\"token constant\">ATTESTATION_CONVEYANCE_PREFERENCE_NONE</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">[</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n    <span class=\"token constant\">null</span>\n<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// Store options in session for verification</span>\n<span class=\"token variable\">$_SESSION</span><span class=\"token punctuation\">[</span><span class=\"token string single-quoted-string\">'registration_challenge'</span><span class=\"token punctuation\">]</span> <span class=\"token operator\">=</span> <span class=\"token variable\">$publicKeyCredentialCreationOptions</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// Return options to client</span>\n<span class=\"token keyword\">echo</span> <span class=\"token function\">json_encode</span><span class=\"token punctuation\">(</span><span class=\"token variable\">$publicKeyCredentialCreationOptions</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></span></code></pre></div>\n<h3 id=\"javascript-nodejs-example\" style=\"position:relative;\"><a href=\"#javascript-nodejs-example\" aria-label=\"javascript nodejs example permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>JavaScript (Node.js) Example</strong></h3>\n<p>Node.js implementations benefit from <code class=\"language-text\">@simplewebauthn/server</code> for backend logic and <code class=\"language-text\">@simplewebauthn/browser</code> for client-side integration:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"35710506897967950000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`// Server-side (Node.js with Express)\nconst { generateRegistrationOptions, verifyRegistrationResponse } = require('@simplewebauthn/server');\napp.post('/passkey/register/options', async (req, res) => {\n    const user = await getUserById(req.body.userId);\n    const options = await generateRegistrationOptions({\n        rpName: 'Your Application',\n        rpID: 'yourdomain.com',\n        userID: user.id,\n        userName: user.email,\n        userDisplayName: user.displayName,\n        attestationType: 'none',\n        authenticatorSelection: {\n            authenticatorAttachment: 'platform',\n            userVerification: 'required'\n        }\n    });\n\n    // Store challenge in session\n    req.session.currentChallenge = options.challenge;\n\n    res.json(options);\n});\n\napp.post('/passkey/register/verify', async (req, res) => {\n    const verification = await verifyRegistrationResponse({\n        response: req.body,\n        expectedChallenge: req.session.currentChallenge,\n        expectedOrigin: 'https://yourdomain.com',\n        expectedRPID: 'yourdomain.com'\n    });\n\n    if (verification.verified) {\n        await storeCredential(verification.registrationInfo);\n        res.json({ verified: true });\n    } else {\n        res.status(400).json({ verified: false });\n    }\n});`, `35710506897967950000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\"><span class=\"token comment\">// Server-side (Node.js with Express)</span>\n<span class=\"token keyword\">const</span> <span class=\"token punctuation\">{</span> generateRegistrationOptions<span class=\"token punctuation\">,</span> verifyRegistrationResponse <span class=\"token punctuation\">}</span> <span class=\"token operator\">=</span> <span class=\"token function\">require</span><span class=\"token punctuation\">(</span><span class=\"token string\">'@simplewebauthn/server'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\napp<span class=\"token punctuation\">.</span><span class=\"token function\">post</span><span class=\"token punctuation\">(</span><span class=\"token string\">'/passkey/register/options'</span><span class=\"token punctuation\">,</span> <span class=\"token keyword\">async</span> <span class=\"token punctuation\">(</span><span class=\"token parameter\">req<span class=\"token punctuation\">,</span> res</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> <span class=\"token punctuation\">{</span>\n    <span class=\"token keyword\">const</span> user <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> <span class=\"token function\">getUserById</span><span class=\"token punctuation\">(</span>req<span class=\"token punctuation\">.</span>body<span class=\"token punctuation\">.</span>userId<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n    <span class=\"token keyword\">const</span> options <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> <span class=\"token function\">generateRegistrationOptions</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n        <span class=\"token literal-property property\">rpName</span><span class=\"token operator\">:</span> <span class=\"token string\">'Your Application'</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">rpID</span><span class=\"token operator\">:</span> <span class=\"token string\">'yourdomain.com'</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">userID</span><span class=\"token operator\">:</span> user<span class=\"token punctuation\">.</span>id<span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">userName</span><span class=\"token operator\">:</span> user<span class=\"token punctuation\">.</span>email<span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">userDisplayName</span><span class=\"token operator\">:</span> user<span class=\"token punctuation\">.</span>displayName<span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">attestationType</span><span class=\"token operator\">:</span> <span class=\"token string\">'none'</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">authenticatorSelection</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n            <span class=\"token literal-property property\">authenticatorAttachment</span><span class=\"token operator\">:</span> <span class=\"token string\">'platform'</span><span class=\"token punctuation\">,</span>\n            <span class=\"token literal-property property\">userVerification</span><span class=\"token operator\">:</span> <span class=\"token string\">'required'</span>\n        <span class=\"token punctuation\">}</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n    <span class=\"token comment\">// Store challenge in session</span>\n    req<span class=\"token punctuation\">.</span>session<span class=\"token punctuation\">.</span>currentChallenge <span class=\"token operator\">=</span> options<span class=\"token punctuation\">.</span>challenge<span class=\"token punctuation\">;</span>\n\n    res<span class=\"token punctuation\">.</span><span class=\"token function\">json</span><span class=\"token punctuation\">(</span>options<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\napp<span class=\"token punctuation\">.</span><span class=\"token function\">post</span><span class=\"token punctuation\">(</span><span class=\"token string\">'/passkey/register/verify'</span><span class=\"token punctuation\">,</span> <span class=\"token keyword\">async</span> <span class=\"token punctuation\">(</span><span class=\"token parameter\">req<span class=\"token punctuation\">,</span> res</span><span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> <span class=\"token punctuation\">{</span>\n    <span class=\"token keyword\">const</span> verification <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> <span class=\"token function\">verifyRegistrationResponse</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span>\n        <span class=\"token literal-property property\">response</span><span class=\"token operator\">:</span> req<span class=\"token punctuation\">.</span>body<span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">expectedChallenge</span><span class=\"token operator\">:</span> req<span class=\"token punctuation\">.</span>session<span class=\"token punctuation\">.</span>currentChallenge<span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">expectedOrigin</span><span class=\"token operator\">:</span> <span class=\"token string\">'https://yourdomain.com'</span><span class=\"token punctuation\">,</span>\n        <span class=\"token literal-property property\">expectedRPID</span><span class=\"token operator\">:</span> <span class=\"token string\">'yourdomain.com'</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n    <span class=\"token keyword\">if</span> <span class=\"token punctuation\">(</span>verification<span class=\"token punctuation\">.</span>verified<span class=\"token punctuation\">)</span> <span class=\"token punctuation\">{</span>\n        <span class=\"token keyword\">await</span> <span class=\"token function\">storeCredential</span><span class=\"token punctuation\">(</span>verification<span class=\"token punctuation\">.</span>registrationInfo<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n        res<span class=\"token punctuation\">.</span><span class=\"token function\">json</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span> <span class=\"token literal-property property\">verified</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n    <span class=\"token punctuation\">}</span> <span class=\"token keyword\">else</span> <span class=\"token punctuation\">{</span>\n        res<span class=\"token punctuation\">.</span><span class=\"token function\">status</span><span class=\"token punctuation\">(</span><span class=\"token number\">400</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">.</span><span class=\"token function\">json</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">{</span> <span class=\"token literal-property property\">verified</span><span class=\"token operator\">:</span> <span class=\"token boolean\">false</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n    <span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<h3 id=\"generic-pseudocode\" style=\"position:relative;\"><a href=\"#generic-pseudocode\" aria-label=\"generic pseudocode permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Generic Pseudocode</strong></h3>\n<p>Simplified pseudocode illustrates the core flow:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"26473201532739465000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied!\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`// Registration Flow\nconst options = await fetch('/generate-registration-options');\nconst credential = await navigator.credentials.create(options);\nawait fetch('/verify-registration', {\n    method: 'POST',\n    body: JSON.stringify(credential)\n});\n\n// Authentication Flow\nconst authOptions = await fetch('/generate-authentication-options');\nconst assertion = await navigator.credentials.get(authOptions);\nawait fetch('/verify-authentication', {\n    method: 'POST',\n    body: JSON.stringify(assertion)\n});`, `26473201532739465000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                <svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"js\"><pre class=\"language-js\"><code class=\"language-js\"><span class=\"token comment\">// Registration Flow</span>\n<span class=\"token keyword\">const</span> options <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> <span class=\"token function\">fetch</span><span class=\"token punctuation\">(</span><span class=\"token string\">'/generate-registration-options'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> credential <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> navigator<span class=\"token punctuation\">.</span>credentials<span class=\"token punctuation\">.</span><span class=\"token function\">create</span><span class=\"token punctuation\">(</span>options<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">await</span> <span class=\"token function\">fetch</span><span class=\"token punctuation\">(</span><span class=\"token string\">'/verify-registration'</span><span class=\"token punctuation\">,</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token literal-property property\">method</span><span class=\"token operator\">:</span> <span class=\"token string\">'POST'</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">body</span><span class=\"token operator\">:</span> <span class=\"token constant\">JSON</span><span class=\"token punctuation\">.</span><span class=\"token function\">stringify</span><span class=\"token punctuation\">(</span>credential<span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n\n<span class=\"token comment\">// Authentication Flow</span>\n<span class=\"token keyword\">const</span> authOptions <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> <span class=\"token function\">fetch</span><span class=\"token punctuation\">(</span><span class=\"token string\">'/generate-authentication-options'</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">const</span> assertion <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> navigator<span class=\"token punctuation\">.</span>credentials<span class=\"token punctuation\">.</span><span class=\"token function\">get</span><span class=\"token punctuation\">(</span>authOptions<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\n<span class=\"token keyword\">await</span> <span class=\"token function\">fetch</span><span class=\"token punctuation\">(</span><span class=\"token string\">'/verify-authentication'</span><span class=\"token punctuation\">,</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token literal-property property\">method</span><span class=\"token operator\">:</span> <span class=\"token string\">'POST'</span><span class=\"token punctuation\">,</span>\n    <span class=\"token literal-property property\">body</span><span class=\"token operator\">:</span> <span class=\"token constant\">JSON</span><span class=\"token punctuation\">.</span><span class=\"token function\">stringify</span><span class=\"token punctuation\">(</span>assertion<span class=\"token punctuation\">)</span>\n<span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code></pre></div>\n<h2 id=\"how-supertokens-supports-passkey-based-authentication\" style=\"position:relative;\"><a href=\"#how-supertokens-supports-passkey-based-authentication\" aria-label=\"how supertokens supports passkey based authentication permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>How SuperTokens Supports Passkey-Based Authentication</strong></h2>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 630px; \"\n    >\n      <a\n    class=\"gatsby-resp-image-link\"\n    href=\"/static/8e9565761146547f3e087972a815cdec/d2f5c/Supertokens.png\"\n    style=\"display: block\"\n    target=\"_blank\"\n    rel=\"noopener\"\n  >\n    <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 40.50632911392405%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAICAYAAAD5nd/tAAAACXBIWXMAAA7DAAAOwwHHb6hkAAABw0lEQVQoz22R227TQBRFLUHisWd8m7HH1zg4tEl6SRu1VSmItgLStERNQVRcPqz/uxBG8IB4WNJ52UvnnO2cdRmvpznnizm74xG1ienShL0q75nWBW2RY9MUrTVplmHSlDzPMcZgM0tZljw9PbFer3GWTcK0iGjTiCoOeZGEHGQRJzbmVWM5HVcclIZJXVHVDUlqUZEhiA0yiJBKIaUkyzKiKMKZpAFNIkkDH6N8mlCymygOteJ62vFmPuFip+Fssc/i6Ji22yXUOSqxyFDjSYUQHoPBANd1cbJQogOfQPooT2B8jzYOmFnN4807vm9WbD9csb1bcb/5yGp9RzuZYfIGFaf4KsTzfXzf63GU7yF9D0+I3zx/xnJvxqf1iuuTAx5v3vLj/j3fHm55fNjwsN3y+ctXjk/O+9NVGDN0XbTOmLzcx+klnocQol9ZuC6BJxhZw2FXcj4ruVyMuFpOuDydc3F6xHw+p6xHJMaigojhcIi1OYeLJY74VygEQrgkUlAkiq5ImDaGvbFl2uaMbMK4spRFgdYGpVSf+VVMHEf/Ebqin2MxQAeScVXQNSU7bc24Log8l0YH5JkmiYK/7/qT/wkyVtDYmWgGSQAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Supertokens\"\n        title=\"Supertokens\"\n        src=\"/static/8e9565761146547f3e087972a815cdec/f058b/Supertokens.png\"\n        srcset=\"/static/8e9565761146547f3e087972a815cdec/c26ae/Supertokens.png 158w,\n/static/8e9565761146547f3e087972a815cdec/6bdcf/Supertokens.png 315w,\n/static/8e9565761146547f3e087972a815cdec/f058b/Supertokens.png 630w,\n/static/8e9565761146547f3e087972a815cdec/40601/Supertokens.png 945w,\n/static/8e9565761146547f3e087972a815cdec/78612/Supertokens.png 1260w,\n/static/8e9565761146547f3e087972a815cdec/d2f5c/Supertokens.png 1363w\"\n        sizes=\"(max-width: 630px) 100vw, 630px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n        decoding=\"async\"\n      />\n  </a>\n    </span></p>\n<p>Passkeys provide a modern, phishing-resistant alternative to passwords, allowing users to authenticate by using simple device-based gestures instead of memorizing credentials. <a href=\"https://supertokens.com/\" target=\"_blank\" rel=\"nofollow\">SuperTokens</a> streamlines this approach by offering fully managed components that handle the complexity of WebAuthn and passkey infrastructure for developers.</p>\n<ul>\n<li><strong>Built-in WebAuthn flows</strong> automate challenge generation, credential verification, and session management without requiring developers to implement complex cryptographic operations. SuperTokens handles the entire passkey lifecycle from registration through authentication and credential revocation.</li>\n<li><strong>Secure credential storage</strong> manages public keys, signature counters, and device metadata in a hardened data store with encryption at rest. The platform tracks credential usage patterns and signature counters to detect potential security anomalies like credential cloning attempts.</li>\n<li><strong>Device management UI</strong> enables users to name, list, and revoke their passkeys through pre-built interfaces that integrate seamlessly with existing authentication flows. Users can manage multiple passkeys across different devices, removing credentials for lost or replaced hardware.</li>\n<li><strong>CSRF and session integration</strong> ensure passkey authentication coordinates properly with existing session management, providing seamless cookie handling alongside <a href=\"https://supertokens.com/features/passwordless-login\" target=\"_blank\" rel=\"nofollow\">passwordless login.</a> This integration maintains security across the complete authentication lifecycle without requiring developers to synchronize multiple authentication mechanisms manually.</li>\n</ul>\n<h2 id=\"what-are-the-best-practices-for-passkey-implementation\" style=\"position:relative;\"><a href=\"#what-are-the-best-practices-for-passkey-implementation\" aria-label=\"what are the best practices for passkey implementation permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>What Are the Best Practices for Passkey Implementation?</strong></h2>\n<p>Passkey deployments benefit most when supported by strong operational and security practices that ensure reliability across different devices and environments. The following guidelines help maintain a secure, user-friendly passwordless experience while reducing failure points and support overhead.</p>\n<ul>\n<li><strong>Use HTTPS everywhere</strong> as WebAuthn APIs are mandatory requirements that will not function over insecure HTTP connections. All authentication flows, from registration through authentication, must occur over properly configured HTTPS with valid TLS certificates.</li>\n<li><strong>Offer fallback authentication methods,</strong> including traditional multi-factor authentication or recovery codes, for scenarios where passkey authentication fails. Users might encounter situations where biometric authentication is unavailable or devices are lost, requiring alternative authentication paths.</li>\n<li><strong>Limit registered devices</strong> by prompting users to review and remove old passkeys periodically. Accumulated credentials from replaced devices create security risks and user confusion, particularly when multiple outdated passkeys appear during authentication.</li>\n<li><strong>Monitor signature counters</strong> to detect credential cloning or misuse. WebAuthn includes signature counters that increment with each use — unexpected counter values indicate potential security issues requiring investigation and possible credential revocation.</li>\n<li><strong>Educate users</strong> through clear prompts explaining passkey functionality, security benefits, and naming guidance. User education reduces support burden while increasing adoption rates by building confidence in passwordless authentication.</li>\n</ul>\n<h2 id=\"conclusion-and-next-steps\" style=\"position:relative;\"><a href=\"#conclusion-and-next-steps\" aria-label=\"conclusion and next steps permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><strong>Conclusion and Next Steps</strong></h2>\n<p>Passkeys mark a clean break from the old username-plus-password ritual, giving users a login experience that feels intuitive on day one and resilient by design. <a href=\"https://fidoalliance.org/wp-content/uploads/2024/10/Barometer-Report-2024-Oct-29.pdf?\" target=\"_blank\" rel=\"nofollow\">Consumer awareness has jumped from 39% to 57% in just two years</a>, demonstrating rapid mainstream acceptance of passwordless authentication technology.</p>\n<p>Major platforms, including Apple, Google, Microsoft, PayPal, Coinbase, and hundreds of others, have implemented passkey support, creating an ecosystem where users increasingly expect passwordless authentication as the standard experience. This momentum signals that passkeys represent not merely an incremental improvement but a fundamental shift in authentication architecture.</p>\n<p><strong>SuperTokens provides turnkey WebAuthn support</strong> that eliminates implementation complexity while delivering production-grade security. The platform handles cryptographic operations, credential storage, device management, and session integration, enabling developers to\ndeploy passkey authentication in hours rather than weeks of custom development.</p>\n<p><em><strong>Start implementing passkey authentication today to provide users with the security and convenience they increasingly expect from modern applications.</strong></em></p>","frontmatter":{"date":"December 09, 2025","title":"Passkey Examples: Real-World Use Cases and Implementation","cover":"passkey-examples.png","author":"Mostafa Ibrahim","description":"Discover real-world passkey examples across Apple, Google, Coinbase, iPhone, PHP, and more, plus step-by-step implementation guidance."},"fields":{"slug":"/passkey-examples/"}},"site":{"siteMetadata":{"title":"SuperTokens Blog"}}},"pageContext":{"id":"bab9edf4-e0ac-5fc3-927c-9e3b1cf5fbf4","fields__slug":"/passkey-examples/","__params":{"fields__slug":"passkey-examples"}}},
    "staticQueryHashes": []}