✨ feat: auto_reauth goes proactive-first (session_expires_at margin) #160
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/proactive-reauth"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
auto_reauthnow means "keep the session alive", in one flag — no new public option. When the expiry is known (from #159'ssession_expires_at) and within 30 s, the client re-authenticates before the request instead of eating a 401 + retry. The reactive 401 path is kept as the fallback for expiry-unknown logins (header absent), early server-side revocation and clock skew.auto_reauth=Falsedisables both, as before.Long-lived WebSocket streams remain out of scope — tracked in #158.
Evidence
auto_reauth=Falseopts out of proactive too, no-op without stored credentials. Existingtest_reauth.pyreactive tests pass unchanged (fallback intact);pytest= 197 passed;mypyclean.Merge Danger
Door: two-way — single semantic flag, revert restores reactive-only.
Blast Radius: low — default-on clients now fire one login POST ~30 s before expiry they'd have eaten a 401 for anyway; observable only as fewer 401s.
auto_reauth=Falseusers: unchanged.Closes #99 (stacked on #159 — merge that first, then retarget to main)
WIP: ✨ feat: auto_reauth goes proactive-first (session_expires_at margin)to ✨ feat: auto_reauth goes proactive-first (session_expires_at margin)570b1b1f755270a4d385