Skip to content

Commit d4e8b66

Browse files
committed
Merge pull request #82 from omniphx/bugfix/81
Check for refresh token before storing
2 parents 6b91ac9 + f5ce648 commit d4e8b66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Omniphx/Forrest/Authentications/WebServer.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ public function callback()
126126

127127
// Encrypt token and store token and in storage.
128128
$this->storage->putTokenData($jsonResponse);
129-
$this->storage->putRefreshToken($jsonResponse['refresh_token']);
129+
if (isset($jsonResponse['refresh_token'])) {
130+
$this->storage->putRefreshToken($jsonResponse['refresh_token']);
131+
}
130132

131133
// Store resources into the storage.
132134
$this->storeResources();

0 commit comments

Comments
 (0)