onAuthFailure property

void Function()? onAuthFailure
final

Optional callback fired when the server signals the account is no longer valid (HTTP 401, or 403 with user_deactivated / account_deactivated / account_banned in the body). Consumers typically wire this to a global "force logout" handler.

Basic auth can't refresh anything, so retry doesn't make sense: the call fails, the consumer is signalled, and the host app is expected to drop the session and surface the login flow.

Implementation

final void Function()? onAuthFailure;