Security: Fix CSRF token not issued on login/register (Issue #756) - #1434
Security: Fix CSRF token not issued on login/register (Issue #756)#1434sahare77 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughRegistration and login now set a client-readable ChangesAuthentication CSRF Flow
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Thank you for your contribution! To keep reviews manageable and maintain repository quality, contributors may have a maximum of 3 open Issues and 3 open Pull Requests at any given time. Please wait until one of your existing submissions is reviewed or closed before opening additional ones. If you believe this was closed by mistake, feel free to contact the maintainers. |
Summary of What Has Been Done
The backend includes a CSRF protection middleware that expects a specific CSRF token cookie from the client. However, the server never actually issued this cookie upon login or session creation. As a result, endpoints requiring this CSRF check (like logout and oken refresh) were permanently unreachable and returned 403 Forbidden.
Changes Made
egisterUser calls.
Impact it Made
Closes #756
Summary
httpOnlycsrfTokencookie after successful login and registration.