shouldRefresh method

bool shouldRefresh(
  1. DescopeSession session
)

Implementation

bool shouldRefresh(DescopeSession session) {
  final expiresAt = session.sessionToken.expiresAt;
  if (expiresAt != null) {
    return DateTime.now().add(stalenessAllowedInterval).isAfter(expiresAt);
  }
  return false;
}