reset method

void reset()

reset is responsible for resetting the timeout clock and notifying the listener listen when fetch a new token

Implementation

void reset() {
  try {
    // this is the time from login or retrieved from state store as string
    final DateTime _expireTime = DateTime.parse(this._expireTime.value);
    // determine if the parse time is 10 minutes to the expiry time
    if (this.ifTokenIsApproachingExpiry(_expireTime)) {
      return this.listen.add(true);
    }
    return;
  } catch (e) {
    return;
  }
}