[BUG] Logging out doesn't redirect to login #179

Closed
opened 2026-02-04 18:27:29 +03:00 by OVERLORD · 9 comments
Owner

Originally created by @bertmelis on GitHub (Jul 31, 2022).

Describe the bug
When I click "Log out", my browser doesn't redirect to the login page.

System

  • Edge browser on Win 11
  • v1.19.0 (latest pull from Docker)

The inspection panel does show a 200 response code with 'OK' statustext from the response after logging out. PING continue to run (with response code 304). I'm effectively logged out. Manually refreshing the page returns me to login.

I'm not familiar with debugging this app (the code is minified = too advanced for me).

Originally created by @bertmelis on GitHub (Jul 31, 2022). **Describe the bug** When I click "Log out", my browser doesn't redirect to the login page. **System** - Edge browser on Win 11 - v1.19.0 (latest pull from Docker) The inspection panel does show a 200 response code with 'OK' statustext from the response after logging out. PING continue to run (with response code 304). I'm effectively logged out. Manually refreshing the page returns me to login. I'm not familiar with debugging this app (the code is minified = too advanced for me).
Author
Owner

@bertmelis commented on GitHub (Jul 31, 2022):

Same thing happens when changing the password after first login. It stays on the "change password" page but manually refreshing solves it.

@bertmelis commented on GitHub (Jul 31, 2022): Same thing happens when changing the password after first login. It stays on the "change password" page but manually refreshing solves it.
Author
Owner

@alextran1502 commented on GitHub (Jul 31, 2022):

This perhaps relates to the change to using cookie authentication recently and conflict with previous authentication method.

If you open your browser in an incognito session and try again, does it also have the same issue?

@alextran1502 commented on GitHub (Jul 31, 2022): This perhaps relates to the change to using cookie authentication recently and conflict with previous authentication method. If you open your browser in an incognito session and try again, does it also have the same issue?
Author
Owner

@bertmelis commented on GitHub (Jul 31, 2022):

Same thing. Mind that the logging out works. It's the (automatic) redirect that doesn't.

This condition should evaluate to true though: 1ba998aa68/web/src/lib/components/shared-components/navigation-bar.svelte (L48). When I inspect the requests/responses, I do get a 200 with statustext "OK".

@bertmelis commented on GitHub (Jul 31, 2022): Same thing. Mind that the logging out works. It's the (automatic) redirect that doesn't. This condition should evaluate to true though: https://github.com/immich-app/immich/blob/1ba998aa68ad91aa3951c81fdf3f0570b7e2b704/web/src/lib/components/shared-components/navigation-bar.svelte#L48. When I inspect the requests/responses, I do get a 200 with statustext "OK".
Author
Owner

@bertmelis commented on GitHub (Jul 31, 2022):

The condition is a bit excessive as I read here though: https://developer.mozilla.org/en-US/docs/Web/API/Response. A status of 200 means statusText to be OK.

@bertmelis commented on GitHub (Jul 31, 2022): The condition is a bit excessive as I read here though: https://developer.mozilla.org/en-US/docs/Web/API/Response. A `status` of `200` means `statusText` to be `OK`.
Author
Owner

@bertmelis commented on GitHub (Jul 31, 2022):

I don't know if it's important to know, but I'm accessing Immich via a reverse proxy (Traefik) that also does TLS termination.

@bertmelis commented on GitHub (Jul 31, 2022): I don't know if it's important to know, but I'm accessing Immich via a reverse proxy (Traefik) that also does TLS termination.
Author
Owner

@alextran1502 commented on GitHub (Jul 31, 2022):

Can confirm this also happen on my reverse proxy instance. Logout wirk but redirect doesn't. I will take a look at this issue later

@alextran1502 commented on GitHub (Jul 31, 2022): Can confirm this also happen on my reverse proxy instance. Logout wirk but redirect doesn't. I will take a look at this issue later
Author
Owner

@bertmelis commented on GitHub (Jul 31, 2022):

I'm somewhat happy I'm not the only one. I'll dive into the code as well although I'm not familiar with Svelte.

@bertmelis commented on GitHub (Jul 31, 2022): I'm somewhat happy I'm not the only one. I'll dive into the code as well although I'm not familiar with Svelte.
Author
Owner

@alextran1502 commented on GitHub (Jul 31, 2022):

Yeah, the annoying part is that it works fine when you accessing the instance locally.

@alextran1502 commented on GitHub (Jul 31, 2022): Yeah, the annoying part is that it works fine when you accessing the instance locally.
Author
Owner

@alextran1502 commented on GitHub (Aug 1, 2022):

Fixed in #414

@alextran1502 commented on GitHub (Aug 1, 2022): Fixed in #414
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#179