Skip to content

Login links don't respect user's theme preference #2829

@jobara

Description

@jobara

Prerequisites

Describe the bug

When the application is run in the local environment, usually only for local development, a series a login links are provided on the login page to simplify testing different user accounts. However, these logins don't respect the user's theme preference and will render the site in these the site was in at the time of login.

To Reproduce

Steps to reproduce the behavior:

  1. Start the site locally with the APP_ENV set to local
  2. Open the site and click "Sign in"
  3. On the Sign in page scroll down and click "Sign in as individual user"
  4. Go to My Settings > Website accessibility preferences
  5. Change the Theme
  6. Save the changes
  7. Logout
  8. Using the Theme picker at the top switch back to the "System" theme.
  9. Go back to "Sign in" and again click "Sign in as individual user"
  10. Notice the site is still rendered in the system theme, though opening the Theme picker or going to the settings shows the selected Theme set.
  11. Logout
  12. Go back to "Sign in" and instead manually enter the user's credentials. ( account is for info+individual@accessibilityexchange.ca).
  13. Notice that this time the site is rendered in the correct theme.

Expected behavior

No response

Screenshots

No response

Details

  • Device:
  • Operating system:
  • Browser:
  • Link to affected page:

Additional context

Appears to be an issue with the x-login-link components in the resources/views/auth/login.blade.php file. Which I believe are related to the spatie/laravel-login-link package.

This may have some relation to cookies.

Relates to #2651

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions