← Back to Home

How to Handle Authenticated Polling in Lit Clients

Updated March 5, 2026
litpollingjwtfrontend authstatus polling

Authenticated Polling in Lit Clients

Use a shared auth service plus a reusable poller utility.

Auth Service Responsibilities

Poller Utility Contract

createPoller({
  getEndpoint,
  intervalMs,
  terminalStates,
  onStatus,
  onComplete,
  onError
});

Polling Behavior

Cleanup Rule

Always call poller.stop() in component disconnect lifecycle to avoid orphan intervals.