Skip to content

Commit

Permalink
opt: set credentialsResponseBody before getUserByToken. close #141
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkcup authored and m1guelpf committed Apr 23, 2019
1 parent 9c04448 commit 1416f70
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/OAuth2/AbstractProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,12 @@ public function user()
}

$response = $this->getAccessTokenResponse($this->getCode());
$this->credentialsResponseBody = $response;

$user = $this->mapUserToObject($this->getUserByToken(
$token = $this->parseAccessToken($response)
));

$this->credentialsResponseBody = $response;

if ($user instanceof User) {
$user->setAccessTokenResponseBody($this->credentialsResponseBody);
}
Expand Down

0 comments on commit 1416f70

Please sign in to comment.