Migrating from OpenID 2.0 to OpenID Connect

折月煮酒 提交于 2019-12-10 10:47:13

问题


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

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