Getting Error: redirect_uri_mismatch The redirect URI in the request: http://localhost:8080/oauth2callback did not match a registered redirect URI

前端 未结 5 628
走了就别回头了
走了就别回头了 2020-12-01 21:34

I\'m getting this error while trying to run my application...

The redirect URI in the request: http://localhost:8080/oauth2callback did not match a registere         


        
相关标签:
5条回答
  • 2020-12-01 22:12

    In main.py functions main class add (decorator.callback_path, decorator.callback_handler()), and remove

    - url: /oauth2callback 
        script: oauth2client/appengine.py 
    

    from app.yaml.

    PS: You might get DownloadError if you have some proxy-configuration/webcontent-filter. If you disable these configurations or deploy it on Google Server, it will work just fine.

    0 讨论(0)
  • 2020-12-01 22:15

    using google openId I configured this

    Redirect URIs: http://domain.com/authenticate/google

    on https://code.google.com/apis/console, if you must create a app if you don't have one, note that must match entirely the url

    0 讨论(0)
  • 2020-12-01 22:28

    seems like google tries to match url with being case-sensitve cause when i tried it with /Authorize and /authorize, it gave me redirect_uri_mismatch error for first one but worked for latter one

    someone try and let me know if i m wrong

    0 讨论(0)
  • 2020-12-01 22:33

    In main.py file,

    in the part where you create a wsgi application

    under application = webapp.wsgiapplication(

    add a handler

    (decorator.callback_path,decorator.callback_handler()),
    
    0 讨论(0)
  • 2020-12-01 22:34

    You will actually need to add the following to your redirect URIs:

    http://localhost:8080/oauth2callback
    

    Also, you may need to append a trailing / if the above doesn't match:

    http://localhost:8080/oauth2callback/
    
    0 讨论(0)
提交回复
热议问题