Skip to content

fix clear cookie issue#54

Merged
Harish-Naruto merged 1 commit intomainfrom
cookie-clear-fix
Dec 5, 2025
Merged

fix clear cookie issue#54
Harish-Naruto merged 1 commit intomainfrom
cookie-clear-fix

Conversation

@Harish-Naruto
Copy link
Copy Markdown
Member

@Harish-Naruto Harish-Naruto commented Dec 5, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced logout security with improved cookie handling attributes.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 5, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The logout handler in the members controller now includes enhanced security attributes when clearing the refresh_token cookie. The cookie clearing operation adds httpOnly, secure, and sameSite flags along with an explicit path specification. Message formatting uses single quotes; control flow remains unchanged.

Changes

Cohort / File(s) Summary
Cookie Security Attributes
backend/src/controllers/members.controller.ts
Enhanced logout handler to clear refresh_token cookie with improved security attributes: httpOnly, secure, sameSite set to "none", and explicit path specification.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify cookie security attributes align with application's CORS and cross-site requirements
  • Confirm sameSite="none" is intentional and appropriate for the use case
  • Review path specification matches the cookie creation path

Poem

🐰 A logout so clean, with cookies well-defined,
Security flags now leave no trace behind,
httpOnly, secure, and sameSite so bright,
The refresh token vanishes into the night! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch cookie-clear-fix

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fbf8eac and 2931783.

📒 Files selected for processing (1)
  • backend/src/controllers/members.controller.ts (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Harish-Naruto Harish-Naruto merged commit be2c146 into main Dec 5, 2025
0 of 2 checks passed
@Harish-Naruto Harish-Naruto deleted the cookie-clear-fix branch December 5, 2025 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant