Update:
I found out that the documentation I was using as a basis was in fact for the old 2.x version... (https://hybridauth.github.io/hybridauth/userguide/HybridAuth_Sessions.html)
So, my question is different: How can I obtain the session data?
I would like to store it in the database, to enable "persistent sessions", not forcing the users to authorize each time.
I'm getting a fatal error when trying to use getSessionData()
Fatal error: Call to undefined method Hybridauth\Hybridauth::getSessionData()
I'm using version HybridAuth 3.1
include $_SERVER['DOCUMENT_ROOT'].'/_makeitwork/hybridauth/src/autoload.php';
include $_SERVER['DOCUMENT_ROOT'].'/hybridauth_config.php';
use Hybridauth\Exception\Exception;
use Hybridauth\Hybridauth;
use Hybridauth\HttpClient;
use Hybridauth\Storage\Session;
try
{
$hybridauth = new Hybridauth($config);
$adapter = $hybridauth->authenticate("Google");
}
catch(Exception $ex){
var_dump($ex);
return;
}
$hybridauth_session_data = $hybridauth->getSessionData(); -------------------------> error line
No, the actual login seems to work.