diff --git a/src/Middleware/OAuthMiddleware.php b/src/Middleware/OAuthMiddleware.php index 9dc3a09..6601690 100644 --- a/src/Middleware/OAuthMiddleware.php +++ b/src/Middleware/OAuthMiddleware.php @@ -65,7 +65,7 @@ public function onBefore() ) { $token = $this->getAccessToken(); if ($token !== null) { - return $handler($request->withAddedHeader('Authorization', 'Bearer '.$token->getToken()), $options); + return $handler($request->withHeader('Authorization', 'Bearer '.$token->getToken()), $options); } }