Skip to main content

NEEDS_REAUTH_THRESHOLD

Constant NEEDS_REAUTH_THRESHOLD 

Source
pub const NEEDS_REAUTH_THRESHOLD: u32 = 5;
Expand description

After this many consecutive TRANSIENT refresh failures, a credential is considered permanently broken rather than retried forever — the sweep loop stops hammering a dead refresh_token on every tick. ensure_fresh (on-demand, e.g. right before a reconnect attempt) still re-checks freshness even from NeedsReauth: if an external login has since succeeded, is_fresh() will report true and state naturally moves back to Fresh. No explicit “clear” API needed.