shouldRefreshAccessToken property

  1. @override
bool get shouldRefreshAccessToken

Implementation

@override
bool get shouldRefreshAccessToken {
  if (_refreshToken == null) {
    return false;
  }
  if (_accessToken == null) {
    return true;
  }
  final expireAt = _expireAt;
  if (expireAt == null) {
    return true;
  }
  final now = DateTime.now().toUtc();
  if (expireAt.compareTo(now) < 0) {
    return true;
  }
  return false;
}