From 2b781c95daf06ec87a8f3deba2ab613d6bea5e8d Mon Sep 17 00:00:00 2001 From: Brian Wozeniak Date: Thu, 25 Mar 2021 21:10:10 -0700 Subject: [PATCH] Fixed invalid_auth error (#645) --- Provider.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Provider.php b/Provider.php index c372b4b..a61eb93 100644 --- a/Provider.php +++ b/Provider.php @@ -102,7 +102,12 @@ protected function getUserByToken($token) { try { $response = $this->getHttpClient()->get( - 'https://slack.com/api/users.identity?token='.$token + 'https://slack.com/api/users.identity', + [ + 'headers' => [ + 'Authorization' => 'Bearer '.$token, + ], + ] ); } catch (RequestException $exception) { // Getting user informations requires the "identity.*" scopes, however we might want to not add them to the