Add Remember Me functionality to login form - #385
Conversation
|
@theabhinav is attempting to deploy a commit to the vishnukothakapu's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
Next review available in: 47 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe authentication route now manages a ChangesRemember-me authentication sessions
ScrollReveal lint configuration
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/api/auth/`[...nextauth]/route.ts:
- Around line 23-33: Move the remember-me cookie write out of the
pre-authentication form-data handling in the auth wrapper and persist it only
after authorize() or signIn succeeds; ensure failed credentials cannot create or
retain a 30-day remember-me value, and reconcile or clear the cookie on
authentication failure. Use the wrapper’s authorize/sign-in flow and the
existing remember-me cookie handling branch as the integration points.
- Around line 16-20: Align rememberMe parsing in the form-data branch with the
JSON branch: update the assignment in the authentication route to accept the
same truthy representations, including boolean true and the string "true" (and
the expected checkbox value such as "on"), instead of only comparing against
"true".
- Around line 10-51: The credentials sign-in logic in the route handler does not
match the actual /callback/credentials endpoint, causing password logins to
always use the OAuth 30-day default. Update the POST credentials branch to match
/callback/credentials and ensure it executes before the generic
pathname.includes("/callback/") OAuth branch, preserving the existing rememberMe
parsing and cookie behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: cd51dd72-0a37-4771-bb96-c58d558ee6e6
📒 Files selected for processing (2)
app/api/auth/[...nextauth]/route.tsapp/components/ScrollReveal.tsx
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hi @theabhinav ! The build is currently failing due to a TypeScript type error in lib/auth.ts. credentials.rememberMe is of type CredentialInput, so comparing it directly with "true" (or other string literals) is invalid. Please update the implementation to use the correct type-safe handling for rememberMe, ensure the project passes npm run build, and then push the updated changes. |
Adds a "Remember Me" option to the login form for persistent user sessions.
Program Participation
I am contributing under EcSOc 2026.

Summary by CodeRabbit
New Features
Chores