Skip to content

feat: implement remember-me login (Feature 023)#4134

Merged
ildyria merged 10 commits intomasterfrom
copilot/create-feature-23-specs
Mar 1, 2026
Merged

feat: implement remember-me login (Feature 023)#4134
ildyria merged 10 commits intomasterfrom
copilot/create-feature-23-specs

Conversation

Copy link
Contributor

Copilot AI commented Feb 28, 2026

Adds opt-in "Remember Me" checkbox to the login form. When checked, Laravel's built-in remember_token + long-lived cookie mechanism is activated via SessionOrTokenGuard (which already supports it but was never called with $remember = true).

Backend

  • RequestAttribute: New REMEMBER_ME_ATTRIBUTE constant
  • LoginRequest: Optional remember_me boolean validation rule + rememberMe() accessor
  • AuthController::login(): Passes $remember to Auth::attempt() (local) and Auth::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() accepts rememberMe param, sends as remember_me in POST body
  • LoginForm.vue: PrimeVue Checkbox below password field, only rendered inside v-if="is_basic_auth_enabled" block

Translations

  • remember_me key added to all 22 lang/*/dialogs.php files with localized strings where available

Tests

  • RememberMeTest: 5 cases covering cookie presence/absence, backward compat (field omitted), invalid credentials, non-boolean → 422

Conflict resolution

  • Restored ALBUM_TITLE_COLOR_ATTRIBUTE, ALBUM_TITLE_POSITION_ATTRIBUTE, HEADER_PHOTO_FOCUS_ATTRIBUTE constants 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

    • Added "Remember Me" checkbox to login form for persistent authentication across browser sessions (default 4-week duration).
    • Configurable login persistence duration via environment variable.
  • Documentation

    • Added comprehensive feature specifications and implementation roadmap.
  • Internationalization

    • Added "Remember Me" label translations for 22 languages.
  • Tests

    • Added verification tests for remember-me login functionality.

Copilot AI and others added 2 commits February 28, 2026 23:15
Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
Copilot AI changed the title [WIP] Add specifications for feature number 23 docs: Feature 023 – Remember Me Login (spec, plan, tasks) Feb 28, 2026
… REMEMBER_LIFETIME env

Co-authored-by: ildyria <627094+ildyria@users.noreply.github.com>
Copilot AI changed the title docs: Feature 023 – Remember Me Login (spec, plan, tasks) Feature 023: Remember Me Login — spec, plan, tasks + 4-week cookie default Feb 28, 2026
Copilot AI and others added 2 commits February 28, 2026 23:47
- 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>
@ildyria ildyria marked this pull request as ready for review February 28, 2026 23:52
@ildyria ildyria requested a review from a team as a code owner February 28, 2026 23:52
Copilot AI changed the title Feature 023: Remember Me Login — spec, plan, tasks + 4-week cookie default feat: implement remember-me login (Feature 023) Feb 28, 2026
…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>
@ildyria
Copy link
Member

ildyria commented Mar 1, 2026

@coderabbitai review please.

@coderabbitai
Copy link

coderabbitai bot commented Mar 1, 2026

@ildyria: I'll review the changes in this PR right away.

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai
Copy link

coderabbitai bot commented Mar 1, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
Configuration & Constants
.env.example, config/auth.php, app/Contracts/Http/Requests/RequestAttribute.php
Added REMEMBER_LIFETIME environment variable configuration (default 40320 minutes), new remember_me configuration entry under Lychee guard, and REMEMBER_ME_ATTRIBUTE constant.
Backend Authentication
app/Http/Requests/Session/LoginRequest.php, app/Http/Controllers/AuthController.php
Extended LoginRequest with remember_me validation and rememberMe() method; updated AuthController login flow to accept and propagate remember flag to both LDAP and local authentication paths, including updated method signature for attemptLdapLogin.
Frontend Components & Services
resources/js/components/forms/auth/LoginForm.vue, resources/js/services/auth-service.ts
Added PrimeVue Checkbox UI component for remember-me in LoginForm; extended auth-service.login method signature to accept optional rememberMe parameter and include it in POST payload.
Translation Entries
lang/{ar,bg,cz,de,el,en,es,fa,fr,hu,it,ja,nl,no,pl,pt,ru,sk,sv,vi,zh_CN,zh_TW}/dialogs.php
Added remember_me translation key across 22 language files with corresponding localized labels for the login dialog.
Documentation & Specifications
docs/specs/4-architecture/features/023-remember-me-login/{spec,plan,tasks}.md, docs/specs/4-architecture/{open-questions,roadmap}.md
Introduced comprehensive feature specification (vision, requirements, scenarios), implementation plan (4-increment strategy), task breakdown with verification steps, updated open questions with cookie duration decision, and roadmap reflecting new active feature.
Feature Tests
tests/Feature_v2/User/RememberMeTest.php
Added RememberMeTest class with 5 test cases covering remember_me cookie presence/absence on login with various scenarios (true, false, omitted, invalid credentials, non-boolean input).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~28 minutes

Poem

🐰 A hop and a click, a checkbox so neat,
"Remember me!" the login will greet,
Four weeks of trust, from backend to view,
Across twenty-two tongues, the feature rings true,
Twenty-two lands, one remember-me dream!

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.

✏️ 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.

❤️ Share

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

@ildyria ildyria enabled auto-merge (squash) March 1, 2026 00:11
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between a3a6645 and 388068b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (35)
  • .env.example
  • app/Contracts/Http/Requests/RequestAttribute.php
  • app/Http/Controllers/AuthController.php
  • app/Http/Requests/Session/LoginRequest.php
  • config/auth.php
  • docs/specs/4-architecture/features/023-remember-me-login/plan.md
  • docs/specs/4-architecture/features/023-remember-me-login/spec.md
  • docs/specs/4-architecture/features/023-remember-me-login/tasks.md
  • docs/specs/4-architecture/open-questions.md
  • docs/specs/4-architecture/roadmap.md
  • lang/ar/dialogs.php
  • lang/bg/dialogs.php
  • lang/cz/dialogs.php
  • lang/de/dialogs.php
  • lang/el/dialogs.php
  • lang/en/dialogs.php
  • lang/es/dialogs.php
  • lang/fa/dialogs.php
  • lang/fr/dialogs.php
  • lang/hu/dialogs.php
  • lang/it/dialogs.php
  • lang/ja/dialogs.php
  • lang/nl/dialogs.php
  • lang/no/dialogs.php
  • lang/pl/dialogs.php
  • lang/pt/dialogs.php
  • lang/ru/dialogs.php
  • lang/sk/dialogs.php
  • lang/sv/dialogs.php
  • lang/vi/dialogs.php
  • lang/zh_CN/dialogs.php
  • lang/zh_TW/dialogs.php
  • resources/js/components/forms/auth/LoginForm.vue
  • resources/js/services/auth-service.ts
  • tests/Feature_v2/User/RememberMeTest.php

@ildyria ildyria merged commit fec5f7b into master Mar 1, 2026
43 checks passed
@ildyria ildyria deleted the copilot/create-feature-23-specs branch March 1, 2026 10:48
@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.35%. Comparing base (a3a6645) to head (905acf8).
⚠️ Report is 1 commits behind head on master.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

2 participants