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

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

Closed
2 tasks done
deathblade666 opened this issue May 13, 2024 · 4 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@deathblade666
Copy link

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

@deathblade666 deathblade666 added the bug Something isn't working label May 13, 2024
@twk3
Copy link
Contributor

twk3 commented 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.

@deathblade666
Copy link
Author

@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.

@safehome-jdev
Copy link

@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

@twk3
Copy link
Contributor

twk3 commented 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 twk3 closed this as completed Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants