refreshToken method

Future<void> refreshToken({
  1. String? reason,
})

Requests fresh credentials from main thread.

Called by SolidBackend when HTTP request receives 401 Unauthorized. This indicates the access token has expired and needs refresh.

Sends RequestTokenRefreshMessage and waits for response. Throws TimeoutException if no response within 10 seconds.

Implementation

Future<void> refreshToken({String? reason}) async {
  await _requestTokenRefresh(reason: reason);
}