jwt-tutorial-flutter icon indicating copy to clipboard operation
jwt-tutorial-flutter copied to clipboard

Value always returns true

Open razein97 opened this issue 4 years ago • 0 comments

https://github.com/carzacc/jwt-tutorial-flutter/blob/dcda3bd36107e416bbe4b43afd5ab3bb432eddf7/lib/main.dart#L39

The if statement should be:

if(DateTime.now().isAfter(DateTime.fromMillisecondsSinceEpoch(payload["exp"] * 1000))){
}

Your statement always return true as the value is negative. Thank You.

razein97 avatar Oct 15 '20 14:10 razein97