refreshToken method
Refreshes an Access Token issuing a refresh_token grant to the OAuth2 server.
Implementation
Future<AccessTokenResponse> refreshToken(String refreshToken,
{httpClient,
required String clientId,
String? clientSecret,
List<String>? scopes}) async {
final Map params = getRefreshUrlParams(refreshToken: refreshToken);
var response = await _performAuthorizedRequest(
url: _getRefreshUrl(),
clientId: clientId,
clientSecret: clientSecret,
params: params,
httpClient: httpClient);
return http2TokenResponse(response, requestedScopes: scopes);
}