`localhost` Is Special

What works in local development

OriginRP ID
http://localhost:3000localhost
http://localhost:8000localhost
http://localhostlocalhost
rp: { id: "localhost", name: "My Dev App" }

Why this matters

  • localhost is treated as a secure context even without TLS.
  • Ports are ignored for RP ID identity.
  • A credential created on :3000 can work on :8000.
  • This is convenient for dev, but those credentials are not portable to production domains.
Intro to Passkeys
9 / 15