OTWO-7708 Removed default setup of remember_token cookie - #1935
Open
bd-vaibhav wants to merge 1 commit into
Open
OTWO-7708 Removed default setup of remember_token cookie#1935bd-vaibhav wants to merge 1 commit into
bd-vaibhav wants to merge 1 commit into
Conversation
bd-vaibhav
requested review from
Niharika1117 and
Priya5
and
a lite review from Copilot
August 10, 2026 07:28
There was a problem hiding this comment.
Pull request overview
This PR updates session handling so “remember me” behavior is driven by an explicit remember_me helper cookie (set from the sign-in checkbox) rather than a default persistent remember_token cookie setup, and adds coverage around that helper cookie.
Changes:
- Add a
cookie_expirationpolicy to Clearance based on theremember_mehelper cookie. - Refactor
SessionsController#createto delegate result handling and set/clear theremember_mecookie on successful sign-in. - Add controller tests validating
remember_mecookie behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
test/controllers/sessions_controller_test.rb |
Adds tests asserting remember_me cookie is set/cleared based on the checkbox. |
config/initializers/clearance.rb |
Configures Clearance cookie_expiration based on a remember_me helper cookie and introduces a duration constant. |
app/controllers/sessions_controller.rb |
Refactors sign-in flow and sets/deletes the remember_me helper cookie. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.