Php 谷歌+;OAuth API-错误400
我在Google+认证方面有点问题,我似乎无法解决这个问题 我正在本地机器上的WAMP服务器上运行一个页面。该网站位于localhost:80上 我按如下方式设置OAuth凭据:Php 谷歌+;OAuth API-错误400,php,oauth,google-plus,Php,Oauth,Google Plus,我在Google+认证方面有点问题,我似乎无法解决这个问题 我正在本地机器上的WAMP服务器上运行一个页面。该网站位于localhost:80上 我按如下方式设置OAuth凭据: REDIRECT URIS http://localhost:80/oauth2callback JAVASCRIPT ORIGINS http://localhost:80 因此回调和JS源代码都被调优为localhost:80(据我所知) 然而,当我使用Google+登录按钮时,我点击了我的Google帐
REDIRECT URIS
http://localhost:80/oauth2callback
JAVASCRIPT ORIGINS
http://localhost:80
因此回调和JS源代码都被调优为localhost:80(据我所知)
然而,当我使用Google+登录按钮时,我点击了我的Google帐户,但随后收到以下错误消息
400. That’s an error.
Error: origin_mismatch
Request Details
=
from_login=1
e=3100077
scope=https://www.googleapis.com/auth/plus.login
redirect_uri=postmessage
state=886354831|0.2093651692
origin=http://localhost
as=6ab1e337782cd5f6
pli=1
request_visible_actions=http://schema.org/AddAction
hl=en
response_type=code token id_token gsession
cookie_policy=single_host_origin
proxy=oauth2relay1316100299
include_granted_scopes=true
client_id=/blanked this part for security/-jsaproji1sk0u1b8kjlh3m3n4i232m4b.apps.googleusercontent.com
authuser=0
That’s all we know.
它概述了错误是由于原点不匹配造成的。我已经尝试将OAuth origin和redirect凭证分别设置为localhost和localhost:80,但都给出了错误400
有经验的人能帮我一把吗?我还是个新手
提前感谢,,
Sam您是否尝试将javascript源代码也设置为:
http://localhost
不仅仅是http://localhost:80
原点必须完全匹配,并且在查询中,它不包含作为原点一部分的端口号
您可以通过每行添加一个原点来添加多个原点。-龙火