mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 17:23:22 +03:00
🐛 Bug Report: Pocket-ID login loop after logout due to conflicting access_token cookies
#376
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kmendell on GitHub.
Discussed in https://github.com/stonith404/pocket-id/discussions/170
Originally posted by agreenfield1 January 23, 2025
I've encountered an issue I was able to resolve it mostly, but am presenting it here as I'm not sure if it is a Pocket-ID or caddy-security bug, or just a configuration issue.
Summary: Pocket-ID enters a state where it is impossible to log in after logging out. The login process loops back to the sign-in page. This issue is resolved by manually deleting cookies (access_token specifically).
How to reproduce:
https://<service>.domain.comandhttps://pocketid.domain.com, and set up the caddy-security module according to the provided documentation for<service>https://<service>.domain.comand authorizehttps://pocketid.domain.comand authorizehttps://pocketid.domain.comCause:
It looks like there are two
access_tokencookies underhttps://pocketid.domain.com:https://<service>.domain.com, and the domain scope is.domain.comhttps://pocketid.domain.com, and the domain scope ispocketid.domain.comWhen logging out the value of Cookie2 is cleared but Cookie1 remains, a scenario that appears not handled well by Pocket-ID.
Not sure if this is an issue more related to Pocket ID or caddy-security. But it could certainly be handled better I think. I was able to resolve it by inserting the following line into my caddyfile for each
<service>, but not sure if this is the best fix?:@stonith404 commented on GitHub:
Great, I'll create a release ASAP. @agreenfield1 Thanks for giving such a detailed bug description, this really helped to debug the issue.
@kmendell commented on GitHub:
@stonith404 Im not sure if this is a bug in Pocket ID or not, I moved this to and issue to investigate further.
@stonith404 commented on GitHub:
Fixed in
0.27.1.@agreenfield1 commented on GitHub:
Tried the development image per the Q&A thread and it appears fixed!