• php - LightOpenID Steam Login Return 406 Error
    2 replies, posted
So I've been trying to figure out why the hell LightOpenID returns a 406 error anytime I try using the Steam web API to verify, but I've had no luck. Has anyone else had this problem before? Any glaring issues in my code? The verification system works fine when I login from a single page, but returns the 406 error when I separate the login process (i.e login button on the home page that executes code to verify Steam user via seperate files/classes). [CODE]public function LoginOID() { $openid = new LightOpenID($this->redirecturl); if(!$openid->mode) { $openid->identity = "http://steamcommunity.com/openid/"; header('Location: ' . $openid->authUrl()); } elseif($openid->mode == "cancel") { echo("auth cancelled"); } else { if($openid->validate()) { preg_match("/^http:\/\/steamcommunity\.com\/openid\/id\/(7[0-9]{15,25}+)$/", $openid->identity, $matches); $usersteamid = ($matches[1]); $user = new User($this->apikey, $usersteamid); $_SESSION["steamid"] = ($usersteamid); $_SESSION["userdata"] = ($user); } else { echo("auth fail"); } } }[/CODE] Sorry for the shitty formatting. Forums kinda fucked it up.
[QUOTE=Handsome Matt;50324960]stuff[/QUOTE] Holy fuck thank you so much. I was stuck on that shit for a week and was hoping either you someone else who's used lightopenid would see this.
Sorry, you need to Log In to post a reply to this thread.