Hey y’all! Thanks for an awesome product!
I’m trying to get Caddy, jwt and login to work together to authorize access to my reverse proxy setup, but I’m having difficulty (most likely due to my noobish ways). The browser’s console clearly has my token and I’ve validated it at jwt.io containing relevant data.
My problem; I’m visiting home.domain.tld, and I’m redirected to auth.domain.tld. All good so far. But as soon as I’ve authenticated with Google, I’m returned to the login page asking me to login again. I’m not redirected back to the original home site with access to its data.
OS: FreeBSD 11.2-STABLE #0 r325575+fc3d65faae6(freenas/11.2-stable)
Arch: amd64
Version: Caddy 0.11.3
Caddyfile:
Heya,
Thanks for your reply! I’ve tried hard-coding a value as well as tried it empty or a bogus URL, but success_url doesn’t seem to be honored (or make any difference at all), so I’m quite confident my problems aren’t (directly) related to that flag, but I’m happily proven wrong
Yeah, success_url is only used when there’s no ?backTo= query. The latter overrides the former.
I’ve got a similar setup. I tried it over subdomains (i.e. login.whitestrake.net) but ended up consolidating on a single subdomain - not because it didn’t work (it did work for me across subdomains) but as a matter of preference.
I can’t see what would be going wrong based on the config I’m reading in your post, but the only general advice I can give is to simplify until you can get it working, then start adding in complexity again. Try doing it on a single subdomain first.
Hmm, OK …
Thanks for your help, both of you, it seems I had royally screwed my login template which seems to have been the cause. After reverting to a previous version of that, things started rolling again. @Whitestrake: Your comment about simplifying nudged me in the right direction, thanks!
Take care, y’all …