User Login & SSO

WebAuthn - Credential Registration

Ceremony in which a relying party asks the browser, through the WebAuthn API, to create a new public key credential (passkey) on an authenticator, and then verifies and stores the returned public key.

Registration is the WebAuthn ceremony that creates a credential. The relying party (RP) sends a random challenge and some parameters, the application passes them to the browser with navigator.credentials.create(), and the browser asks an authenticator (a platform authenticator such as Touch ID or Windows Hello, or a roaming one such as a security key) to generate a new key pair.

The private key never leaves the authenticator. The RP receives only the public key and a credential ID, and stores them with the user's account. The credential is scoped to the RP ID (the site's domain), so it cannot be used on a look-alike site, which makes it phishing-resistant.

This diagram shows registration with a user-verifying authenticator and attestation: "none".

Relying PartyAuthenticatorBrowserUserRelying PartyAuthenticatorBrowserUserClick "Create passkey"1POST /webauthn/register/options2Creation options + challenge3navigator.credentials.create()4Request user verification5Biometric / PIN / touch6Generate key pair7Attestation object8POST /webauthn/register/verify9Validate and store public key10200 OK11