I'm using the LightOpenID library to attempt to register a user via OpenID. Everything seems to be working just fine for Google authentication except that validate() always fails. I'm dumping $openid and all the data seems to be in order, though still, validate() fails.
I have seen this question LightOpenID validate() fail on Google Apps but my problem is slightly different as I've determined that the response isn't a server not found but that the server for some reason responds with is_valid: false. Why might this be?
Here's how I'm going about it (in Laravel):
// testing with Google
try {
$openid = new LightOpenID();
if (!$openid->mode) {
$openid->required = array('contact/email');
$openid->identity = 'https://www.google.com/accounts/o8/id';
return Redirect::to($openid->authURL());
} else if ($openid->mode == "cancel") {
echo "User has canceled authentication.";
} else {
$attributes = $openid->getAttributes();
// debugging
echo ($openid->validate()) ? "Logged in " : "Not logged in ";
?><pre><?php echo var_dump($openid);?></pre><pre><?php
echo var_dump($attributes);?></pre><?php
}
} catch (ErrorException $e) {
echo $e->getMessage();
}
return View::make('home.index');
Any help would be greatly appreciated, thanks in advance.