feat(auth): fix BFF cookie integration and enhance logging#55
feat(auth): fix BFF cookie integration and enhance logging#55luisdlopera wants to merge 1 commit into
Conversation
- Generated comprehensive auth-audit-report.md detailing the login failure issue - Fixed architecture inconsistency in NestJS backend where AUTH_COOKIES=true stripped refreshToken from JSON response, causing Next.js BFF to fail with 502 - Added granular debug logging events in the backend's login use case - Enhanced Next.js BFF login route logging with error details when payload is incomplete
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR addresses the authentication flow audit and fixing the core login issue.
Key changes:
auth-audit-report.mdroot file detailing the exact cause of the login failure (BFF and backend mismatch). Contains structural GitHub issues ready to be opened.502 Invalid auth responseby ensuring the backend always returns therefreshTokenin the JSON payload, even if it is also setting a cookie viaAUTH_COOKIES=true.login.use-case.ts) tracing the entire authentication verification process without exposing secrets./api/auth/loginhandler to better document when payload constraints fail.PR created automatically by Jules for task 7019139910850448693 started by @luisdlopera