Prevent duplicate session in auth code grant

The session already exists in the database, so we don't need to save it again. Doing so results in the session used for the auth code hanging around in the database with nothing associated to it, while the access token is associated to a new session caused by the `save()` method creating a duplicate. Fixes #266.
This commit is contained in:
Regan 2014-12-15 15:09:36 +13:00
parent 7f815275d6
commit d32bfaa757

View File

@ -260,7 +260,6 @@ class AuthCodeGrant extends AbstractGrant
$code->expire(); $code->expire();
// Save all the things // Save all the things
$session->save();
$accessToken->setSession($session); $accessToken->setSession($session);
$accessToken->save(); $accessToken->save();