What goes wrong
localhost, they all share the same RP ID.localhost.Practical ways to handle it
localhost to be convenient for dev, but imperfect when many apps coexist.Verification and storage
type RegistrationVerification = { challenge: string; origin: string; rpId: string; credentialId: Uint8Array; publicKey: Uint8Array; signCount: number; };
challenge matches what you issued.origin matches your allowed origins.rpId matches your configured site identity.What you keep for later
credentialId so you can look up the right passkey laterpublicKey for verifying future assertionssignCount as a cloned-key warning signalIf the signature counter goes backwards or stops behaving as expected, treat it as suspicious and trigger extra review or recovery.