Commit a58e6b1
feat: wire up cookie auth and complete the password reset flow
Implement the previously scaffolded auth. Login issues a JWT in an
httpOnly cookie, the tRPC context verifies it, and a privateProcedure
guards authenticated queries. Add logout and me procedures, and hydrate
client user state on load.
Build out password reset properly. Store a hashed, single-use token with
a one-hour expiry, email the raw token, and add a completion endpoint
plus a /reset-password page to set a new password. The request endpoint
no longer reveals whether an email is registered.
Harden and tidy up alongside:
- restrict CORS to APP_URL with credentials
- honour BASE_PATH in the router basename and the tRPC URL
- type-check vite.config.ts and format the whole repo via .prettierignore
- portable build:server clean and removal of unused dependencies
- accessibility fixes (zoom, input labels) and assorted cleanups
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 1ff61f7 commit a58e6b1
29 files changed
Lines changed: 334 additions & 78 deletions
File tree
- src
- client
- components
- app
- error
- loading
- pages
- home
- reset-password
- state
- config
- server
- actions
- models
- services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
0 commit comments