S
Solara•9mo ago
Johnowhitaker

OAuth example fails

https://solara.dev/documentation/examples/general/login_oauth clicking the button results in an error page with Callback URL mismatch.
4 Replies
MaartenBreddels
MaartenBreddels•9mo ago
Hi Jonathan, thanks for reporting. This was a real head scratcher! We recently moved our infrastructure (also the cause for some of the outage), and due to missing/changed configuration, the redirect was to http:// instead of https:// which was not allowed by auth0. I'll follow up with some documentation changes so other people don't also run into this. For the impatient: nginx needs:
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
uvicorn needs:
UVICORN_PROXY_HEADERS=1
FORWARDED_ALLOW_IPS = "*" # only secure when the proxy cannot be reached from outside
UVICORN_PROXY_HEADERS=1
FORWARDED_ALLOW_IPS = "*" # only secure when the proxy cannot be reached from outside
Johnowhitaker
JohnowhitakerOP•9mo ago
@MaartenBreddels while we're on auth, the comments here switch ID and secret I think 🙂
No description
MaartenBreddels
MaartenBreddels•9mo ago
Good catch, that is now fixed (should be deployed soon). For followup, the original issue led to this PR: https://github.com/widgetti/solara/pull/597
Monty Python
Monty Python•9mo ago
maartenbreddels
<:pull_open:882464248721182842> [widgetti/solara] docs: explain configuration needed for oauth behind a (nginx) proxy
I had to restructure the nginx configuration example a bit to make it less confusing.
Created
Want results from more Discord servers?
Add your server