Skip to content

remember-me middleware: user locale not restored on auto-login #108

@fabiodalez-dev

Description

@fabiodalez-dev

Problem

E2E test `tests/branch-fix-consistency.spec.js:118:3` → "remember-me middleware restores user locale on auto-login" fails. After a successful auto-login from the remember-me cookie, the user's `locale` (e.g. `en_US`, `de_DE`) is not applied to the session / view, falling back to the default locale.

Reproduction

```bash
/tmp/run-e2e.sh tests/branch-fix-consistency.spec.js \
--config=tests/playwright.config.js --workers=1 \
--grep "remember-me"
```

Impact

Non-default-locale users (DE/EN installs, or users who changed their preferred locale) see Italian labels the first time they reopen a remember-me-authed session after an expiry.

Likely fix area

`app/Middleware/RememberMeMiddleware.php` (or equivalent) should read `utenti.locale` and call the same locale-setter used by the regular login flow.

Identified during PR #105 audit, unrelated to that PR's changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions