ProxyAuth not working correctly with Caddy #541
Replies: 1 comment
|
I think the loop is caused by cookie scope, not by the Caddy route to the hello-world container. The important clue is this sequence:
That usually means the browser has a valid In the current source, voidauth:
environment:
APP_URL: https://auth.testing.local
SESSION_DOMAIN: testing.local
STORAGE_KEY: <32 character key>
DB_ADAPTER: sqlite
ENABLE_DEBUG: trueThen recreate/restart the VoidAuth container and log in again so the cookie is reissued with the shared domain. Also make sure the ProxyAuth domain in VoidAuth is something that matches the protected app, for example Your Caddy After restart, check the browser devtools cookie entry. If it is still scoped only to If this fixes the redirect loop, please mark the answer so the next Caddy/ProxyAuth setup can spot the session-domain requirement. |
Uh oh!
There was an error while loading. Please reload this page.
Hello, and thank you for such a great looking project!
I'm trying to use VoidAuth's ProxyAuth capability in front of a simple hello world web app with Caddy, all running on containers. I can log into VoidAuth, and the
x-voidauth-sessioncookie works properly (I don't have to log into VoidAuth each time I visit it). The Caddy configuration also looks to be working correctly, because when I browse to the hello world web app it will redirect me to VoidAuth and require me to login if I'm not logged in already.From here though, I get into an endless redirect loop and I cannot figure out why. Has anyone else experienced this?
I am using Caddy's Local HTTPS certificate, and I have added it to my browser's cert store such that when I browse to VoidAuth or my hello world web app the browser considers the page secure. I also have a local DNS server that's serving up the
testing.localdomain.Please help! 🙏🏻
Docker Compose:
Caddyfile:
VoidAuth Debug Logs:
All reactions