feat: implement remember-me login (Feature 023)#4134
Conversation
Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
… REMEMBER_LIFETIME env Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
- Add REMEMBER_ME_ATTRIBUTE constant to RequestAttribute - Add remember_me validation and accessor to LoginRequest - Pass remember flag to Auth::attempt() and Auth::login() in AuthController - Include remember flag in login log messages - Pass remember_me through LDAP login flow - Add remember_me param to auth-service.ts login() - Add PrimeVue Checkbox to LoginForm.vue (inside basic auth block) - Add remember_me translations in all 22 languages Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
- Simplify remember_me extraction in LoginRequest - Use camelCase for TS/Vue variables (rememberMe) - Keep snake_case only in POST body to match backend - Revert unrelated package-lock.json changes - Add RememberMeTest with 5 test cases Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
…e constants Add ALBUM_TITLE_COLOR_ATTRIBUTE, ALBUM_TITLE_POSITION_ATTRIBUTE, and HEADER_PHOTO_FOCUS_ATTRIBUTE constants that were introduced in master via album header improvements (#4105) but missing from the feature branch. Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
|
@coderabbitai review please. |
|
✅ Actions performedReview triggered.
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR implements a "Remember Me" login feature enabling persistent authentication across the application stack. Changes include backend support (LoginRequest, AuthController, auth config), frontend UI checkbox and service updates, comprehensive documentation (spec, plan, tasks), translations across 22 languages, and feature tests validating cookie-based remember-me behavior. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~28 minutes Poem
🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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: 4
🧹 Nitpick comments (4)
lang/cz/dialogs.php (1)
69-69: Consider adding the Czech translation.The value is currently in English ("Remember me") rather than Czech. For consistency with other translated strings in this file (e.g., "Zavřít", "Zrušit"), consider using the Czech translation: "Zapamatuj si mě".
This is optional given the PR's scope of adding translations "where available."
💬 Suggested Czech translation
- 'remember_me' => 'Remember me', + 'remember_me' => 'Zapamatuj si mě',docs/specs/4-architecture/features/023-remember-me-login/tasks.md (1)
136-144: Add the required markdown footer format at the bottom.This doc should end with an HR and
*Last updated: ...*footer at the bottom (not only near the top).As per coding guidelines "
**/*.md: At the bottom of documentation files, add an hr line followed by 'Last updated: [date of the update]'."docs/specs/4-architecture/open-questions.md (1)
1770-1776: Update the "Last updated" date.The resolved question Q-023-01 was added after the "Last updated: 2026-01-02" line. Per documentation guidelines, update the date to reflect the latest changes (2026-02-28).
Also, per the open-questions workflow, resolved questions should be removed once the answer is captured in the spec's normative sections. Since Q-023-01's decision is now recorded in spec.md (Non-Goals, NFR-023-01), this entry could be removed entirely, or at minimum moved above the horizontal rule and timestamp.
docs/specs/4-architecture/roadmap.md (1)
103-103: Update the "Last updated" date.The file shows "Last updated: 2026-02-26" but the changes in this PR are dated 2026-02-28. Update to reflect the current date.
ℹ️ Review info
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (35)
.env.exampleapp/Contracts/Http/Requests/RequestAttribute.phpapp/Http/Controllers/AuthController.phpapp/Http/Requests/Session/LoginRequest.phpconfig/auth.phpdocs/specs/4-architecture/features/023-remember-me-login/plan.mddocs/specs/4-architecture/features/023-remember-me-login/spec.mddocs/specs/4-architecture/features/023-remember-me-login/tasks.mddocs/specs/4-architecture/open-questions.mddocs/specs/4-architecture/roadmap.mdlang/ar/dialogs.phplang/bg/dialogs.phplang/cz/dialogs.phplang/de/dialogs.phplang/el/dialogs.phplang/en/dialogs.phplang/es/dialogs.phplang/fa/dialogs.phplang/fr/dialogs.phplang/hu/dialogs.phplang/it/dialogs.phplang/ja/dialogs.phplang/nl/dialogs.phplang/no/dialogs.phplang/pl/dialogs.phplang/pt/dialogs.phplang/ru/dialogs.phplang/sk/dialogs.phplang/sv/dialogs.phplang/vi/dialogs.phplang/zh_CN/dialogs.phplang/zh_TW/dialogs.phpresources/js/components/forms/auth/LoginForm.vueresources/js/services/auth-service.tstests/Feature_v2/User/RememberMeTest.php
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Adds opt-in "Remember Me" checkbox to the login form. When checked, Laravel's built-in
remember_token+ long-lived cookie mechanism is activated viaSessionOrTokenGuard(which already supports it but was never called with$remember = true).Backend
RequestAttribute: NewREMEMBER_ME_ATTRIBUTEconstantLoginRequest: Optionalremember_meboolean validation rule +rememberMe()accessorAuthController::login(): Passes$remembertoAuth::attempt()(local) andAuth::login()(LDAP); log messages include[remember=true/false]config/auth.php:'remember' => (int) env('REMEMBER_LIFETIME', 40320)on the lychee guard (4 weeks default)Frontend
auth-service.ts:login()acceptsrememberMeparam, sends asremember_mein POST bodyLoginForm.vue: PrimeVueCheckboxbelow password field, only rendered insidev-if="is_basic_auth_enabled"blockTranslations
remember_mekey added to all 22lang/*/dialogs.phpfiles with localized strings where availableTests
RememberMeTest: 5 cases covering cookie presence/absence, backward compat (field omitted), invalid credentials, non-boolean → 422Conflict resolution
ALBUM_TITLE_COLOR_ATTRIBUTE,ALBUM_TITLE_POSITION_ATTRIBUTE,HEADER_PHOTO_FOCUS_ATTRIBUTEconstants added to master via Album header improvements #4105💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Summary by CodeRabbit
Release Notes
New Features
Documentation
Internationalization
Tests