You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to run getUserProfile() with a OpenID-powered provider, such as Steam, the OpenID service will fire an exception with the following message: Provider returned an unexpected response. Dug deep into the cause of this, it seems like Hybridauth/Adapter/OpenID.php, line 267 returns a phpIncompleteClass object, which then fails the next is_object check:
$userProfile = $this->storage->get($this->providerId . '.user');
if (! is_object($userProfile)) {
I don't know why and how to solve this.
Version and provider
Steam, version 3.0 RC 7
PHP 7.1.2
Reproduction
Set up a regular Steam provider authentication flow. Authenticate. Try to run getUserProfile() when already authenticated, Hybridauth returns Provider returned an unexpected response..
The text was updated successfully, but these errors were encountered:
Ah, my bad. If your project initialized PHP's session before including Hybridauth, the Hybridauth\User\Profile class is not yet initialized, causing the object to be marked as phpIncompleteClass. This is not a bug intrinsic to Hybridauth, however, given most of PHP applications make use of PHP session, maybe the logic can be changed somehow.
This seems like a pretty easy fix. I am not messing with OpenID so I can't test it, but it seems if you just serialize any object before putting it into storage, and unserialize it when you get it out, this will defer the class check.
Probably should not be storing objects in the StorageInterface anyway, it is defined as a string key value store..,
/**
* Add or Update an item to storage
*
* @param string $key
* @param string $value
*/
public function set($key, $value);
Bug
When trying to run
getUserProfile()
with a OpenID-powered provider, such as Steam, the OpenID service will fire an exception with the following message:Provider returned an unexpected response
. Dug deep into the cause of this, it seems likeHybridauth/Adapter/OpenID.php
, line 267 returns a phpIncompleteClass object, which then fails the nextis_object
check:I don't know why and how to solve this.
Version and provider
Steam, version 3.0 RC 7
PHP 7.1.2
Reproduction
Set up a regular Steam provider authentication flow. Authenticate. Try to run
getUserProfile()
when already authenticated, Hybridauth returnsProvider returned an unexpected response.
.The text was updated successfully, but these errors were encountered: