As we know Google Login is migrating from OpenId2.0 to OpenId connect. I have changed my code as like
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>';
}
}
But it is throwing an error like invalid parameters sent
. Should I need to add/change anything?
来源:https://stackoverflow.com/questions/29599622/migrating-from-openid-2-0-to-openid-connect