mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-11 07:42:58 +03:00
🐛 Bug Report: caddy-security Unauthorized "no token found" #382
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 @jmadden91 on GitHub.
Reproduction steps
Hi, thanks again for the great work on this program. I've been tearing my hair out with this for hours now, I fully suspect the issue is with my caddy config rather than pocket-id, so I'm sorry if that is the case and this is not the right place for this issue.
I have set up caddy security and pocket id, created an OIDC client in pocket-id called caddy, with the callback URL set to:
https://*.mydomain.com/auth/oauth2/generic/authorization-code-callbackWhen I go to the service I am trying to protect (whoami) I am redirected to pocket-id, I can successfully log in, but then I am redirected back to a generic authentication portal page that says Unauthorized.
The error in my caddy logs is
{"level":"error","ts":1737419909.9818547,"logger":"http.handlers.authentication","msg":"auth provider returned error","provider":"authorizer","error":"user authorization failed: src_ip=192.168.1.15, src_conn_ip=192.168.1.15, reason: no token found"}Here is my caddyfile:
Expected behavior
It redirect back to my whoami page.
Actual Behavior
As above