isExpiringSoon method
Checks if the token is expiring soon (within 5 minutes by default)
Implementation
bool isExpiringSoon([Duration threshold = const Duration(minutes: 5)]) {
return DateTime.now().isAfter(expiresAt.subtract(threshold));
}
Checks if the token is expiring soon (within 5 minutes by default)
bool isExpiringSoon([Duration threshold = const Duration(minutes: 5)]) {
return DateTime.now().isAfter(expiresAt.subtract(threshold));
}