I'm using Laravel 4 to implement Hybrid Auth (Steam Community). I have made two methods in my Controller, login and logout.
Login is working, and displays the information from Steam:
public function login()
{
$config = array(
"base_url" => "http://site.com/login/auth",
"providers" => array (
"OpenID" => array (
"enabled" => true
),
"Steam" => array (
"enabled" => true
)
)
);
try {
$socialAuth = new Hybrid_Auth($config);
$provider = $socialAuth->authenticate("Steam");
$userProfile = $provider->getUserProfile();
}
catch(Exception $e) {
return "Error: " . $e;
}
echo "Connected with: <b>{$provider->id}</b><br />";
echo "As: <b>{$userProfile->displayName}</b><br />";
echo "<pre>" . print_r( $userProfile, true ) . "</pre><br />";
echo "<img src=". $userProfile->photoURL . ">";
}
Now to logout, I would call $provider->logout();
However I want to logout using another method.
However, I can't seem to understand how this would work... I have tried things such as:
public function logout()
{
Hybrid_Auth()->authenticate('Steam')->logout();
}
There is documentation on http://hybridauth.sourceforge.net/apidoc.html delaring methods(?) such as Hybrid_Auth::logoutAllProviders()
But I can't seem to work out how to use it!
Any help would be swell!
Thanks.