api + docs: say what went wrong when RP_ID or ORIGIN does not match
@simplewebauthn reports a mismatch as "Unexpected RP ID hash", which tells a self-hoster nothing about their own .env — and this is the most common support question in #install-help, where charliebelt is currently stuck behind a Cloudflare Tunnel with values that look right. The error now names both configured values back and points at the docs. Neither is a secret: one is the address bar, the other its hostname. Extracted as api/verify-error.js so it can be tested without booting a server that opens files and a port, following push-messages.js. SELF_HOSTING.md gets the diagnosis in order: read what the server logged on startup (it prints rpID and origin, and `docker compose restart` does not re-read .env), then the exact shape of each value as a table, then the reverse-proxy case, then www., then that changing the hostname invalidates existing passkeys. Plus the thing adam934912 called a blocker: on a LAN without certificates there is nothing to configure that makes passkeys work.
This commit is contained in:
1 parent
37d6cf895a
commit
6ea7526bff
5 files changed
+93
-4
No files matched your search
+1
-1
@@ -18,7 +18,7 @@ LABEL maintainer="Duarte Santos https://gitlab.com/DuarteSantos8" \
|
||||
WORKDIR /app
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm install --omit=dev && npm cache clean --force
|
||||
COPY server.js push-messages.js ./
|
||||
COPY server.js push-messages.js verify-error.js ./
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
|
||||
Reference in new issue
Block a user