Issue with OAuth redirect URI: http vs https mismatch
See original GitHub issueIssue Summary
I’m following this guide: https://redash.io/help/open-source/admin-guide/google-developer-account-setup
To set up Redash on my server, which is running on docker compose via the Google Compute Engine instances that Redash provides on their website. I configured HTTPS according to this guide: https://gist.github.com/arikfr/64c9ff8d2f2b703d4e44fe9e45a7730e and I am setting up OAuth through Google
Steps to Reproduce
- Follow this guide exactly: https://redash.io/help/open-source/admin-guide/google-developer-account-setup
- Try and log in via OAuth
I received this error:
Error 400: redirect_uri_mismatch
The redirect URI in the request, http://[domain].com/oauth/google_callback, does not match the ones authorized for the OAuth client. To update the authorized redirect URIs, visit: [URL]
My suspicion is that the redirect URI that redash provides is http, whereas the redirect URI that the Redash guide has my type into Google is https. This error vanished after I changed the authorized URL for my OAuth Client to the http url, however I received a different error, an Internal Server Error in the Redash app and, in the logs, OAuthException: Invalid response from google
. Not sure if this is an unrelated issue, but this http/https change is inconsistent with the Google OAuth docs at the very least.
Technical details:
- Redash Version: 5.0.2
- Browser/OS: Firefox / Debian 10
- How did you install Redash: See above
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (1 by maintainers)
@alexwennerberg sounds like the nginx doesn’t pass the correct protocol to the Python code. Can you try changing line 61 in nginx.conf from:
to:
Thanks master!