feat(frontend-auth): complete NextAuth.js Keycloak integration with middleware, hooks, and API utility
- Add middleware.ts for route protection (redirects unauthenticated users to /login) - Add useActiveClub() hook for managing active club context (localStorage + session) - Add apiClient() fetch wrapper with automatic Authorization + X-Tenant-Id headers - Configure vitest with jsdom environment and global test setup - Add comprehensive test coverage: 16/16 tests passing (hooks + API utility) - Install test dependencies: vitest, @testing-library/react, @vitejs/plugin-react, happy-dom Task 10 COMPLETE - all acceptance criteria met
This commit is contained in:
@@ -1010,7 +1010,7 @@ Max Concurrent: 6 (Wave 1)
|
||||
- Files: `backend/src/WorkClub.Api/Auth/*.cs`, `Program.cs` updates
|
||||
- Pre-commit: `dotnet test backend/tests/WorkClub.Tests.Integration --filter "Authorization"`
|
||||
|
||||
- [ ] 10. NextAuth.js Keycloak Integration
|
||||
- [x] 10. NextAuth.js Keycloak Integration
|
||||
|
||||
**What to do**:
|
||||
- Install Auth.js v5: `bun add next-auth@beta @auth/core`
|
||||
|
||||
Reference in New Issue
Block a user