diff --git a/src/Id/Concerns/ManagesUsers.php b/src/Id/Concerns/ManagesUsers.php index 3e00ee4..34fbe99 100644 --- a/src/Id/Concerns/ManagesUsers.php +++ b/src/Id/Concerns/ManagesUsers.php @@ -46,6 +46,20 @@ trait ManagesUsers return $this->post('v1/users', $attributes); } + /** + * Refreshes the access token using the refresh token. + */ + public function refreshToken(string $storedRefreshToken, string $scope = ''): Result + { + return $this->post('../oauth/token', [ + 'grant_type' => 'refresh_token', + 'refresh_token' => $storedRefreshToken, + 'client_id' => $this->clientId, + 'client_secret' => $this->clientSecret, + 'scope' => $scope, + ]); + } + /** * Checks if the given email exists. *