Passkey authentication can be demystified by examining the actual data exchange between browser and server during creation and login, revealing that while cryptographically complex, the process follows an intuitive client-server flow using standard web APIs.
The video demonstrates a working implementation of WebAuthn passkey authentication using a custom PHP/JavaScript demo. The presenter built this to visualize the complete data flow during passkey creation and authentication—data that's normally hidden from users. WebAuthn is the W3C specification (officially recognized in 2018) that enables passwordless authentication using public-key cryptography. Passkeys are FIDO credentials that implement this standard, allowing users to authenticate with biometrics, PINs, or device unlock mechanisms instead of passwords.
The technical flow works as follows: During registration, the client fetches creation arguments from the server (including a random challenge, relying party ID, and user information). The browser calls navigator.credentials.create() which triggers the OS/TPM/password manager to generate a public-private key pair. The private key never leaves the device; the public key, credential ID, and signed challenge are sent to the server for storage. During authentication, the server sends a new challenge. The client calls navigator.credentials.get(), the authenticator signs the challenge with the private key, and the server verifies the signature using the stored public key.
Key implementation libraries include SimpleWebAuthn (TypeScript, available at https://github.com/MasterKale/SimpleWebAuthn) for Node/Deno environments, and lbuchs/WebAuthn (PHP, available at https://github.com/lbuchs/WebAuthn) which the presenter likely used. The Trusted Platform Module (TPM) is a hardware security chip that stores cryptographic keys in tamper-resistant storage—it's built into most PCs manufactured after 2010 and is required for Windows 11. The attestation data mentioned in the video contains certificate chains proving the authenticator's authenticity, though most servers ignore this for consumer applications. The sign count field detects cloned authenticators by incrementing after each use. The challenge token (typically 32 random bytes) prevents replay attacks by ensuring each authentication is unique and time-bound.
WebAuthn passkey authentication, while cryptographically sophisticated, follows a straightforward client-server exchange using standard browser APIs that replace passwords with public-key cryptography.