我们知道Google Login正在从OpenId2.0迁移到OpenId connect。我已将代码更改为
require 'oauth/openid.php';
$openid = new LightOpenID;
$openid->realm = "http://".$_SERVER[HTTP_HOST];
$openid->identity = 'https://www.google.com/accounts/o8/id';
$openid->required = array('contact/email');
if (!headers_sent()){
header('Location: '.$openid->authUrl());
}else{
echo '<script type="text/javascript">';
echo 'window.location.href="'.$openid->authUrl().'";';
echo '</script>';
}
}
但它会抛出像invalid parameters sent
这样的错误。我是否需要添加/更改任何内容?