Open KooEmmanuel opened 9 months ago
I'm having a similar issue on CloudRun. Validate by changing the Google Auth callback to http and see if the app works. The issue has something to do with the CHAINLIT_URL needing to be set.
The Redirect URI configured in Google should be "https://name.azurewebsites.net/auth/oauth/google/callback". Chainlit constructs it from your CHAINLIT_URL environment variable and "/auth/oauth/{provider_id}/callback".
Same problem here, deploying with nginx on server, when URI changed to http there's no problem i think the problem is that chainlit is served as http and therefore the redirect URI is http, if possible to serve as HTTPS i believe it would fix this problem, is there a way?
Set your CHAINLIT_URL to https, all the communication between nginx and cl is unsecured, but keeps the client-facing URLS under https, otherwise you'll get a mixed content warning from the browser.
@dahifi , having the same problem. when you say set your CHAINLIT_URL to https, you mean set the env. variable to the redirect uri ? or just put CHAINLIT_URL = "https" in the .env file ?
When attempting to authenticate via OAuth2, I encounter the "Error 400: redirect_uri_mismatch." It seems to be related to the redirect URIs not aligning correctly during the authentication process. I suspect this may be linked to the deployment on Azure Web Apps using a container.
In the Google OAuth2 Redirect URLs, I added https://name.azurewebsites.net https://name.azurewebsites.net/oauth/google/callback
I also included these in my environment before building the docker image. OAUTH_GOOGLE_CLIENT_ID = "my_id" OAUTH_GOOGLE_CLIENT_SECRET = "secret" CHAINLIT_AUTH_SECRET=
The local docker container works fine but when I access the https://name.azurewebsites.net, that's when I get the error message "You can’t sign in because this app sent an invalid request. Error 400: redirect_uri_mismatch"
This is what I have in my docker file FROM python:3.11
How can I fix this?