revokeToken method

Future<void> revokeToken()

Revokes the current token at the authorization server and clears it locally.

Implementation

Future<void> revokeToken() async {
  if (_currentToken != null) {
    try {
      await _client.revokeToken(token: _currentToken!.accessToken);
    } catch (e) {
      // Even if remote revocation fails, drop the local token.
    }
  }
  clearToken();
}