feat(api): add auth middleware to protect game endpoints
- Add requireAuth middleware using Better Auth session validation - Apply to all game routes (start, answer) - Unauthenticated requests return 401
This commit is contained in:
parent
91a3112d8b
commit
a3685a9e68
13 changed files with 196 additions and 24 deletions
|
|
@ -13,9 +13,11 @@
|
|||
"@glossa/db": "workspace:*",
|
||||
"@glossa/shared": "workspace:*",
|
||||
"better-auth": "^1.6.2",
|
||||
"cors": "^2.8.6",
|
||||
"express": "^5.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/cors": "^2.8.19",
|
||||
"@types/express": "^5.0.6",
|
||||
"@types/supertest": "^7.2.0",
|
||||
"supertest": "^7.2.2",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue