From d32bfaa75723679ba71d939384dd43c5cfb4532f Mon Sep 17 00:00:00 2001 From: Regan Date: Mon, 15 Dec 2014 15:09:36 +1300 Subject: [PATCH] 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. --- src/Grant/AuthCodeGrant.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Grant/AuthCodeGrant.php b/src/Grant/AuthCodeGrant.php index a248dc16..46ceb062 100644 --- a/src/Grant/AuthCodeGrant.php +++ b/src/Grant/AuthCodeGrant.php @@ -260,7 +260,6 @@ class AuthCodeGrant extends AbstractGrant $code->expire(); // Save all the things - $session->save(); $accessToken->setSession($session); $accessToken->save();