-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/fix token error #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
… use withCredentials
…ookies for token management
…and update registration to dispatch token in Redux
PR Reviewer Guide 🔍(Review updated until commit 8493ea1)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 8493ea1
Previous suggestionsSuggestions
|
||||||||||||||||||||||||||||
|
/review |
|
Persistent review updated to latest commit 8493ea1 |
|
/improve
" |
|
Persistent suggestions updated to latest commit 8493ea1 |
User description
<img width="1024" height="1024" alt="ChatGPT Image Jul 30, 2025, 11_42_55 AM (1)" src="https://github.com/user-attachments/assets/c63227ad-8fa9-4859-
ba6e-a0354a9a07ec" />
PR Type
Bug fix, Enhancement
Description
Implement cookie-based authentication to replace header tokens
Add cookie-parser middleware for secure token handling
Update login/register responses to include access tokens
Fix authentication flow with proper Redux token dispatch
Diagram Walkthrough
File Walkthrough
index.js
Add cookie middleware and CORS credentialsBack-end/index.js
auth.controller.js
Implement cookie-based token managementBack-end/src/controllers/auth/auth.controller.js
Reg.jsx
Add Redux token dispatch on registrationfront-end/src/pages/Auth/Reg.jsx
authenticate.js
Switch from header to cookie authenticationBack-end/src/middlewares/auth/authenticate.js
req.cookies.access_tokenpackage.json
Add cookie-parser dependencyBack-end/package.json