Replies: 1 comment 2 replies
-
I suppose you're generating the Redirect URI like shown in our FastAPI web application example: redirect_uri = request.url_for("auth_callback") If so, it's probably because your FastAPI/Uvicorn server is not aware that it's served behind HTTPS. If you use an hosting platform or proxy that handle HTTPS, you have to set an environment variable so Unicorn accepts it and generates HTTPS URL:
|
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Making a request for a secured FastAPI endpoint and running into an issue. When I configure the application example in the tutorial after successfully getting it to work fine using a localhost, the redirect for the production deployment passes back the wrong redirect-uri.
Resource I'm accessing is:
https://myhost.mydomain.com/api/protected
All seems to work and the I get a 'redirect_uri is not authorized for this client'. I checked the Redirect URIs in the Admin Console and I have it correctly set as:
https://myhost.mydomain.com/api/auth-callback
Looking at the url, it is trying to redirect me to HTTP instead of HTTPS url:
https://myhost.fief.dev/authorize?response_type=code&client_id=aafpLXpwUCyXE6b2mxs0aDVup66dVG2i3-R23brRx3M&redirect_uri=http%3A%2F%2Fmyhost.mydomain.com%2Fapi%2Fauth-callback&scope=openid
Any ideas on how to troubleshoot or fix this? Super stumped. Ideas? Please help.
Beta Was this translation helpful? Give feedback.
All reactions