Configuration
Time idle before logout fires — e.g. 900000 = 15 min
How often to ping the server when the user is active
POST endpoint called on each heartbeat
Redirect target when the session expires
Controls demo behavior — no real server required. "Network Error (handled)" demonstrates the correct resilience pattern: catch transient errors inside
onHeartbeat and only throw on auth failures.
Generated Code