getTokenTime static method
Returns token issuing date (iat)
Implementation
static Duration getTokenTime(String token) {
final decodedToken = decode(token)!;
final issuedAtDate = DateTime.fromMillisecondsSinceEpoch(0)
.add(Duration(seconds: decodedToken["iat"]));
return DateTime.now().difference(issuedAtDate);
}