From 3ac86cf4259d76a21bed8d2f0300fbd9037154c0 Mon Sep 17 00:00:00 2001 From: Michael Hadley Date: Tue, 6 Aug 2024 17:02:49 -0700 Subject: [PATCH 1/2] Add `organizationId` parameter to `authenticateWithRefreshToken` --- lib/UserManagement.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/UserManagement.php b/lib/UserManagement.php index 4e0d9a1..c5e6290 100644 --- a/lib/UserManagement.php +++ b/lib/UserManagement.php @@ -796,6 +796,7 @@ public function authenticateWithMagicAuth( * @param string $refreshToken The refresh token used to obtain a new access token * @param string|null $ipAddress The IP address of the request from the user who is attempting to authenticate. * @param string|null $userAgent The user agent of the request from the user who is attempting to authenticate. + * @param string|null $organizationId The user agent of the request from the user who is attempting to authenticate. * * @throws Exception\WorkOSException * @@ -805,12 +806,14 @@ public function authenticateWithRefreshToken( $clientId, $refreshToken, $ipAddress = null, - $userAgent = null + $userAgent = null, + $organizationId = null ) { $path = "user_management/authenticate"; $params = [ "client_id" => $clientId, "refresh_token" => $refreshToken, + "organization_id" => $organizationId, "ip_address" => $ipAddress, "user_agent" => $userAgent, "grant_type" => "refresh_token", From e375ffec69971ebacf4b971ed1b86d8874c987c6 Mon Sep 17 00:00:00 2001 From: Michael Hadley Date: Tue, 6 Aug 2024 17:09:55 -0700 Subject: [PATCH 2/2] Fix test --- tests/WorkOS/UserManagementTest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/WorkOS/UserManagementTest.php b/tests/WorkOS/UserManagementTest.php index d079861..c687fdf 100644 --- a/tests/WorkOS/UserManagementTest.php +++ b/tests/WorkOS/UserManagementTest.php @@ -377,6 +377,7 @@ public function testAuthenticateWithRefreshToken() $params = [ "client_id" => "project_0123456", "refresh_token" => "Xw0NsCVXMBf7svAoIoKBmkpEK", + "organization_id" => null, "ip_address" => null, "user_agent" => null, "grant_type" => "refresh_token",