isTokenTimeIssue function

bool isTokenTimeIssue(
  1. Object error
)

Returns whether the given error object is a token error that occurred due to the user's incorrect device clock.

Implementation

bool isTokenTimeIssue(Object error) {
  if (error is! PlatformException) return false;

  final details = error.details;
  return details is String &&
      (details.contains('10 minutes') || details.contains('ID Token expired'));
}