feat: add JWT authentication with register, login, refresh, and me endpoints

Adds bcrypt password hashing, JWT access/refresh token generation, requireAuth middleware, and /api/auth routes (POST /register, POST /login, POST /refresh, GET /me).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-02 11:42:11 +08:00
parent 2a15cbaead
commit 2ed957762c
9 changed files with 353 additions and 4 deletions

View File

@@ -1,2 +1,5 @@
packages:
- "packages/*"
onlyBuiltDependencies:
- bcrypt