Resolved authentication issue where user.id was undefined, causing Epic creation to fail.
Root Cause:
- Backend /api/auth/login returns UserDto with PascalCase fields (Id, Email, etc.)
- Backend /api/auth/me returns JWT claims with camelCase (userId, email, etc.)
- Frontend User type expects camelCase fields (id, email, etc.)
- Previous code directly assigned backend fields without mapping
Changes:
- useLogin: Added field mapping to handle both PascalCase and camelCase
- useCurrentUser: Map userId -> id and tenantSlug -> tenantName
- Both functions now correctly populate user.id for localStorage persistence
Impact:
- Epic creation now works (user.id is correctly set)
- Auth state persists correctly across page reloads
- Consistent user object structure throughout frontend
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>