Commit 208e21b
fix(passkey): address Copilot review on #63
- Warn at startup if WebAuthn RPID resolved to "localhost" *and* BASE_URL
was never explicitly set. Without this, an operator who forgot to
configure BASE_URL in production gets a working-looking Passkey UI that
fails at registration with an opaque origin-mismatch error from the
browser. The warning makes the misconfig findable in the journal.
- Set `Cache-Control: no-store` (+ `Pragma: no-cache` for old proxies) on
the PasskeyRegisterBegin response. The body carries a single-use
challenge + session_id bound to the requesting user; an intermediary
cache could surface the same challenge to a different user. The /finish
handler's per-user session-ID check would reject the cross-user case,
but defense-in-depth costs two header lines.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 029ca5d commit 208e21b
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
419 | 430 | | |
420 | 431 | | |
421 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
93 | 94 | | |
| 95 | + | |
| 96 | + | |
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
| |||
0 commit comments