From 12caaab7c18c8b54fb3463d2e3e623f007f7fcfa Mon Sep 17 00:00:00 2001 From: Henne Van Och Date: Tue, 1 Mar 2022 15:36:01 +0100 Subject: [PATCH] Move oauth middleware after redirects middleware so redirect also get new oauth token --- lib/phpSmug/Client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/phpSmug/Client.php b/lib/phpSmug/Client.php index dd3cdfd..979ff18 100644 --- a/lib/phpSmug/Client.php +++ b/lib/phpSmug/Client.php @@ -309,7 +309,7 @@ private function performRequest($method, $url) $oauth_middleware = new \GuzzleHttp\Subscriber\Oauth\Oauth1($oauth_middleware_config); - $this->stack->unshift($oauth_middleware, 'oauth_middleware'); // Bump OAuth to the bottom of the stack + $this->stack->after('allow_redirects', $oauth_middleware, 'oauth_middleware'); // Bump OAuth to the bottom of the stack } // Merge the default and request options for all requests except upload requests.