Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logout: Redirect to base URI instead of "/" #1901

Closed
tpneill opened this issue Jan 7, 2022 · 4 comments
Closed

Logout: Redirect to base URI instead of "/" #1901

tpneill opened this issue Jan 7, 2022 · 4 comments
Assignees
Labels
bug Something isn't working released Available in the stable release

Comments

@tpneill
Copy link

tpneill commented Jan 7, 2022

What does not work as expected?

When logging out of Photoprism both explicitly and due to session expiry I am redirected to the site root URL even when I have a non-root site URL defined.

How can we reproduce it?

Steps to reproduce the behavior:

  1. Configure Photoprism to run from a non-root site URL by using PHOTOPRISM_SITE_URL, e.g. PHOTOPRISM_SITE_URL=https://example.com/photoprism/
  2. Login as normal
  3. Click the logout button
  4. You will be redirected to the root site URL e.g. https://example.com/

What behavior do you expect?

Logout button should take you to the configured non-root site URL e.g. https://example.com/photoprism/

What version you are using?

211215

Any other helpful information?

This appears to be coming from a onLogout inside frontend/src/common/session.js:

  onLogout(noRedirect) {
    this.deleteId();
    if (noRedirect !== true) {
      window.location = "/";
    }
    return Promise.resolve();
  }

window.location should be set to the same value configured in PHOTOPRISM_SITE_URL

@tpneill tpneill added the bug Something isn't working label Jan 7, 2022
@lastzero lastzero self-assigned this Jan 7, 2022
@lastzero
Copy link
Member

lastzero commented Jan 7, 2022

Wish we had never added this feature! 😂

@lastzero lastzero changed the title UX: Logout redirects to site root when non-root site is defined Config: Logout redirects to site root when non-root site is defined Jan 7, 2022
@lastzero lastzero added the in-progress Somebody is working on this label Jan 17, 2022
@lastzero lastzero changed the title Config: Logout redirects to site root when non-root site is defined Logout: Redirect to base URI instead of "/" Jan 17, 2022
@lastzero lastzero added please-test Ready for acceptance test and removed in-progress Somebody is working on this labels Jan 17, 2022
@lastzero
Copy link
Member

Is it working for you now with our Development Preview?

@budokaiman
Copy link

budokaiman commented Jan 18, 2022

Wish we had never added this feature!

I, on the other hand, greatly appreciate that it exists.

Is it working for you now with our Development Preview?

It is working for me on dev preview 220118-76c94a1f

@graciousgrey
Copy link
Member

Thanks for testing :)

@graciousgrey graciousgrey added released Available in the stable release and removed please-test Ready for acceptance test labels Jan 18, 2022
@lastzero lastzero moved this to Released 🌈 in Roadmap 🚀✨ Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

4 participants