mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-11-01 16:33:07 +05:30
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:
parent
7f815275d6
commit
d32bfaa757
@ -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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user