RP ID: The Rule That Trips People Up

  • The RP ID is always a domain name. It never includes scheme or port.
  • example.com works for https://example.com and https://app.example.com.
  • app.example.com is narrower and only works for that exact subdomain.
  • evil.com cannot claim example.com; the browser rejects the request.
rp: { id: "example.com", name: "Example App" } // later rpId: "example.com"
Diagram showing RP ID and origin binding for WebAuthn
Intro to Passkeys
7 / 15