pub async fn ensure_fresh_token(
client: &Client,
) -> Result<OAuthCredentials, String>Expand description
Acquire an exclusive lock on auth.json, check token freshness, refresh if needed, and persist the result. Returns the current (possibly refreshed) credentials.