Felipe Cardoso
1f66c9fab1
fix(sse): Fix critical SSE auth and URL issues
1. Fix SSE URL mismatch (CRITICAL):
- Frontend was connecting to /events instead of /events/stream
- Updated useProjectEvents.ts to use correct endpoint path
2. Fix SSE token authentication (CRITICAL):
- EventSource API doesn't support custom headers
- Added get_current_user_sse dependency that accepts tokens from:
- Authorization header (preferred, for non-EventSource clients)
- Query parameter 'token' (fallback for browser EventSource)
- Updated SSE endpoint to use new auth dependency
- Both auth methods now work correctly
Files changed:
- backend/app/api/dependencies/auth.py: +80 lines (new SSE auth)
- backend/app/api/routes/events.py: +23 lines (query param support)
- frontend/src/lib/hooks/useProjectEvents.ts: +5 lines (URL fix)
All 20 backend SSE tests pass.
All 17 frontend useProjectEvents tests pass.
2025-12-31 11:59:33 +01:00
..
2025-12-31 11:19:07 +01:00
2025-12-31 11:19:07 +01:00
2025-11-25 07:59:20 +01:00
2025-12-30 23:46:50 +01:00
2025-11-08 15:46:52 +01:00
2025-12-31 11:59:33 +01:00
2025-12-30 10:35:30 +01:00
2025-10-31 21:46:03 +01:00
2025-11-17 20:27:09 +01:00