Web サイトで PHP を使用して OpenID を実装しています。私が書いたコードは次のように...
<?php
session_start();
require_once('openid.php');
try
{
# Change 'localhost' to your domain name.
$openid = new LightOpenID('openid.ch.net16.com');
$openid->required = array(
'namePerson',
'namePerson/first',
'namePerson/last',
'contact/email',
);
$openid->identity = 'https://www.google.com/accounts/o8/id';
$openid->returnUrl = 'http://www.openid.ch.net16.com/home.php';
if(!$openid->mode)
{
$_SESSION['auth']="Google";
header('Location: ' . $openid->authUrl());
}
else
{
echo 'User has canceled authentication!';
}
}
catch(ErrorException $e)
{
echo $e->getMessage();
}
?>
しかし、グーグルは次のように言っています....
エラー: invalid_request
OpenID 認証要求の解析中にエラーが発生しました。
もっと詳しく知る
この問題を解決するのを手伝ってください......