Skip to main content
NewsPublished

Passkey registration breaks after moving off localhost..

Source Reddit Cybersecurity

0

Discussion

A user reports that passkey registration using WebAuthn works on localhost but breaks when moving to a custom local domain with a self-signed TLS certificate. The error 'NotAllowedError: WebAuthn is not supported on sites with TLS certificate errors' occurs, indicating that the self-signed certificate is untrusted. The user also notes confusion about the relying party ID (rp_id) and origin settings, as including the port in rp_id is likely incorrect but seems to allow registration. This issue appears related to development environment constraints rather than a direct security vulnerability.

r/cybersecurity (opens in a new tab)u/Sharp_Commercial_1660 points0 comments

Was prototyping passkeys with @ simplewebauthn and everything worked on localhost.

Moved the app to a real domain on the same port (https://testsite.com:3000, added it to my hosts file), and now navigator.credentials.create() throws:

NotAllowedError: WebAuthn is not supported on sites with TLS certificate errors.

The cert is self-signed (openssl, subjectAltName=DNS:testsite.com, serverAuth, etc.). On the server rp_id = testsite.com and rp_origin = https://testsite.com:3000.

Weirdly it does register if I leave the port on the rp_id, which I'm pretty sure is wrong.

Is this purely the self-signed cert being untrusted, or am I also doing the rp_id/origin wrong?

What's the clean way to get passkey registration working on a custom local domain?

Links cited in the discussion

References

Community reviews

Loading reviews…