You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implemented GitHub oAuth for my app. Upon clicking Login using GitHub link, it is not logging in. From the logs, I can see the below error:
WARNING:flask_dance.consumer.oauth2:OAuth 2 authorization error: redirect_uri_mismatch description: The redirect_uri MUST match the registered callback URL for this application. uri: https://docs.github.com/apps/managing-oauth-apps/troubleshooting-authorization-request-errors/#redirect-uri-mismatch
My auth callback URL: https://perfgpt.qainsights.com/login/github/authorized
I went through this issue, but it is not solving my case.
Any insights please?
The text was updated successfully, but these errors were encountered:
My auth callback URL: https://perfgpt.qainsights.com/login/github/authorized
The error message says that given URL does not match the registered callback URL. You need to edit your OAuth app on GitHub and make sure that this URL is in the "Authorization callback URL" field.
Thanks @singingwolfboy I was able to fix it. Below is the code I used. Auth call URL is configured correctly.
class ReverseProxied(object):
def __init__(self, app):
self.app = app
def __call__(self, environ, start_response):
# if one of x_forwarded or preferred_url is https, prefer it.
forwarded_scheme = environ.get("HTTP_X_FORWARDED_PROTO", None)
preferred_scheme = application.config.get("PREFERRED_URL_SCHEME", None)
if "https" in [forwarded_scheme, preferred_scheme]:
environ["wsgi.url_scheme"] = "https"
return self.app(environ, start_response)
I implemented GitHub oAuth for my app. Upon clicking
Login using GitHub
link, it is not logging in. From the logs, I can see the below error:WARNING:flask_dance.consumer.oauth2:OAuth 2 authorization error: redirect_uri_mismatch description: The redirect_uri MUST match the registered callback URL for this application. uri: https://docs.github.com/apps/managing-oauth-apps/troubleshooting-authorization-request-errors/#redirect-uri-mismatch
My auth callback URL:
https://perfgpt.qainsights.com/login/github/authorized
I went through this issue, but it is not solving my case.
Any insights please?
The text was updated successfully, but these errors were encountered: