从OpenID 2.0迁移到OpenID Connect

时间:2015-04-13 07:06:28

标签: php openid google-openid openid-connect

我们知道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这样的错误。我是否需要添加/更改任何内容?

0 个答案:

没有答案