clearCachedTokens method

Future<void> clearCachedTokens()

This is used to clear the session tokens from local storage

Implementation

Future<void> clearCachedTokens() async {
  final idTokenKey = '$keyPrefix.idToken';
  final accessTokenKey = '$keyPrefix.accessToken';
  final refreshTokenKey = '$keyPrefix.refreshToken';
  final clockDriftKey = '$keyPrefix.clockDrift';

  await Future.wait([
    storage.removeItem(idTokenKey),
    storage.removeItem(accessTokenKey),
    storage.removeItem(refreshTokenKey),
    storage.removeItem(clockDriftKey),
    storage.removeItem(pool.lastUserKey),
  ]);
}