Google Oauth2 redirect_uri_mismatch when send request from localhost

帅比萌擦擦* 提交于 2019-12-23 20:41:51

问题


I use Google OAuth2 for my codeigniter application and i send request using the HybridIgniter.

REDIRECT URIS : http://localhost/college-rating-system/hauth/endpoint.

JAVASCRIPT ORIGINS : http://localhost

When send request from localhost then we get 400 error that is,

Error : redirect_uri_mismatch

Any idea ..?


回答1:


Check the full error it will tell you the URL its coming from.

The redirect URI must match exactly what you have placed in the Google developer console.




回答2:


Redirect URIs

http://localhost:8000/ this / at end solve my problem JavaScript origins

http://localhost:8000

NOTE: localhost and 127.0.0.1 conflicts can create problems for you sometime



来源:https://stackoverflow.com/questions/28431545/google-oauth2-redirect-uri-mismatch-when-send-request-from-localhost

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!