Skip to content

Commit

Permalink
reload access token from session on refresh
Browse files Browse the repository at this point in the history
Signed-off-by: Dieter Coopman <dieter@deltasolutions.be>
  • Loading branch information
dietercoopman committed May 30, 2024
1 parent d59fb09 commit 5203fd1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Traits/Authenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ private function getAccessToken()
if (isset($accessData->access_token)) {
if (Carbon::createFromTimestamp($accessData->expires_on)->lte(Carbon::now())) {
$this->refreshAccessToken($accessData->refresh_token);
$accessData = decrypt(session('microsoftgraph-access-data'));
}

return $accessData->access_token;
Expand Down

0 comments on commit 5203fd1

Please sign in to comment.