[Bug]: Logout does not clear session token when using auth headers to login #1094

Closed
opened 2026-02-28 19:31:49 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @deathblade666 on GitHub (May 13, 2024).

Verified issue does not already exist?

  • I have searched and found no existing issue
  • I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file)

What happened?

Setup HTTP Auth header login, pressed logout to end the session, it immediately logs back in as the session token doesnt cleared

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Firefox, Chrome

Operating System

Linux

Originally created by @deathblade666 on GitHub (May 13, 2024). ### Verified issue does not already exist? - [X] I have searched and found no existing issue - [X] I will be providing steps how to reproduce the bug (in most cases this will also mean uploading a demo budget file) ### What happened? Setup HTTP Auth header login, pressed logout to end the session, it immediately logs back in as the session token doesnt cleared ### Where are you hosting Actual? Docker ### What browsers are you seeing the problem on? Firefox, Chrome ### Operating System Linux
GiteaMirror added the bug label 2026-02-28 19:31:49 -06:00
Author
Owner

@twk3 commented on GitHub (May 21, 2024):

@deathblade666 which session token are you referring to? The user-token in the browser is removed, but if you are using a third party auth provider, we aren't clearing their session tokens. Which might result in an automatic re-login.

@twk3 commented on GitHub (May 21, 2024): @deathblade666 which session token are you referring to? The user-token in the browser is removed, but if you are using a third party auth provider, we aren't clearing their session tokens. Which might result in an automatic re-login.
Author
Owner

@deathblade666 commented on GitHub (May 24, 2024):

@deathblade666 which session token are you referring to? The user-token in the browser is removed, but if you are using a third party auth provider, we aren't clearing their session tokens. Which might result in an automatic re-login.

That makes sense, yeah that's probably it honestly unsure how to tell which is which just noticed the token is still there and it autologins back in as soon as I try to logout. Based on your in-out its probably the thrid party token (I use authentik) that's not clearing.

@deathblade666 commented on GitHub (May 24, 2024): > @deathblade666 which session token are you referring to? The user-token in the browser is removed, but if you are using a third party auth provider, we aren't clearing their session tokens. Which might result in an automatic re-login. That makes sense, yeah that's probably it honestly unsure how to tell which is which just noticed the token is still there and it autologins back in as soon as I try to logout. Based on your in-out its probably the thrid party token (I use authentik) that's not clearing.
Author
Owner

@safehome-jdev commented on GitHub (May 26, 2024):

@deathblade666 which session token are you referring to? The user-token in the browser is removed, but if you are using a third party auth provider, we aren't clearing their session tokens. Which might result in an automatic re-login.

That makes sense, yeah that's probably it honestly unsure how to tell which is which just noticed the token is still there and it autologins back in as soon as I try to logout. Based on your in-out its probably the thrid party token (I use authentik) that's not clearing.

Yeah, it looks might be an issue with authentik's sign out methods

@safehome-jdev commented on GitHub (May 26, 2024): > > @deathblade666 which session token are you referring to? The user-token in the browser is removed, but if you are using a third party auth provider, we aren't clearing their session tokens. Which might result in an automatic re-login. > > > > That makes sense, yeah that's probably it honestly unsure how to tell which is which just noticed the token is still there and it autologins back in as soon as I try to logout. Based on your in-out its probably the thrid party token (I use authentik) that's not clearing. Yeah, it looks might be an issue with [authentik's sign out methods](https://github.com/goauthentik/authentik/issues/2023)
Author
Owner

@twk3 commented on GitHub (Jun 8, 2024):

I'm going to go ahead and close this bug. But if someone wants to add a feature that makes this easier to implement a workaround for, please go ahead and open a feature request/PR.

We aren't going to accept something that is tied to a particular provider, but I could see us accepting a change that adds one more network request from the frontend to the backend on logout. (that in the future could be used to invalidate backend tokens). Similar to login, users of authetic and a proxy in front of the backend could then take their own custom actions while proxying that logout route.

@twk3 commented on GitHub (Jun 8, 2024): I'm going to go ahead and close this bug. But if someone wants to add a feature that makes this easier to implement a workaround for, please go ahead and open a feature request/PR. We aren't going to accept something that is tied to a particular provider, but I could see us accepting a change that adds one more network request from the frontend to the backend on logout. (that in the future could be used to invalidate backend tokens). Similar to login, users of authetic and a proxy in front of the backend could then take their own custom actions while proxying that logout route.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#1094