Search code examples
phpopenidlightopenid

LightOpenID not detecting login causing login looping


I have some simple code to hook into steam's OpenID login system

$openid = new LightOpenID('url');
$openid->identity = "http://steamcommunity.com/openid";

if(!$openid->mode) {
    header("Location: " . $openid->authUrl());
} elseif($openid->mode == "cancel") {
    exit("error");
} else {
    $_SESSION['ID'] = $openid->validate() ? $openid->identity : null;

    header("Location: /");
}

However, even after logging into steam using the authUrl it keeps redirecting me to the login page over and over and not detecting $openid->mode.

Any help appreciated.


Solution

  • This was due to a htaccess error. Make sure you have it configured correctly if you have this problem.