cleanupExpiredSessions method

Future<void> cleanupExpiredSessions()

Cleanup expired sessions

Implementation

Future<void> cleanupExpiredSessions() async {
  final expiredKeys = <String>[];
  _activeSessions.forEach((key, session) {
    if (session.isExpired) {
      expiredKeys.add(key);
    }
  });

  for (final key in expiredKeys) {
    _activeSessions.remove(key);
  }
}