artdarek / oauth-4-laravel

OAuth Service Provider for Laravel 4
684 stars 216 forks source link

Provide a clearToken method #46

Closed ajschmaltz closed 9 years ago

ajschmaltz commented 10 years ago

We need to be able to "logout" of a provider. Can we do a clearToken or clearAllTokens method?

ajschmaltz commented 10 years ago

I'm sorry, this is all already taken care of.

$fb =  OAuth::consumer('Facebook');
$fb->getStorage()->clearAllTokens();
ajschmaltz commented 10 years ago

Ok, so here's my problem now, do I actually have to do consumer('Facebook') in order to clear all tokens?

ajschmaltz commented 10 years ago

Again, this is already done. Here's how:

OAuth::createStorageInstance('Session')->clearAllTokens();