getTokenTime static method

Duration? getTokenTime(
  1. String token
)

Returns token issuing date (iat)

Implementation

static Duration? getTokenTime(String token) {
  final issuedAtDate = _getDate(token: token, claim: 'iat');
  if (issuedAtDate == null) {
    return null;
  }
  return DateTime.now().difference(issuedAtDate);
}