-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat(api): add logout endpoint to clear token cookie #581
feat(api): add logout endpoint to clear token cookie #581
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can you also add the request under "Auth Controller" in Bruno? |
okay...i will try that |
@rajdip-b I have added the request in auth controller in Bruno |
User description
Description
Added a logout endpoint to the auth.controller.ts file and the logout function in the auth.service.ts file. This endpoint clears the token cookie, ensuring the user is logged out securely.
Fixes #223
Dependencies
NA
Future Improvements
Mention any improvements to be done in future related to any file/feature
Mentions
@rajdip-b
Screenshots of relevant screens
Add screenshots of relevant screens
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
Enhancement
Description
logout
endpoint in theauth.controller.ts
file to handle user logout by clearing thetoken
cookie.logout
method in theauth.service.ts
file that clears thetoken
cookie and logs the action.Changes walkthrough 📝
auth.controller.ts
Add logout endpoint to AuthController
apps/api/src/auth/controller/auth.controller.ts
logout
to the AuthController.logout
method from the AuthService.auth.service.ts
Implement logout functionality in AuthService
apps/api/src/auth/service/auth.service.ts
logout
method in AuthService.token
cookie from the response.