jwtIssuedAtUtc function
Parses a JWT iat claim value into a UTC timestamp.
Implementation
DateTime? jwtIssuedAtUtc(Object? value) {
if (value is! num) {
return null;
}
try {
return DateTime.fromMillisecondsSinceEpoch(
value.toInt() * 1000,
isUtc: true,
).toUtc();
} on ArgumentError {
return null;
}
}