

Hugging Face Hub 2.5.0, released November 26, adds a command and Python helper for requesting the revocation of access tokens whose raw values are known. The feature is intended to make it possible to respond to a leaked token without first signing in as its owner.
The command, hf auth revoke, operates on token values explicitly supplied to it. The documented server response is deliberately generic: a request acknowledgment is not a confirmation that a particular token existed or that an account was discovered.
Explicit inputs, without ambient authentication
The exact tagged helper builds request headers with token authentication disabled and submits the listed credentials to the revocation endpoint. That avoids implicitly attaching the credential a developer happens to be using for an ordinary authenticated Hub session.
This distinction should be stated precisely. It does not mean a person's own token is impossible to revoke: supplying that raw value explicitly still selects it. The protection concerns accidental use of ambient authorization, rather than a special exemption for the caller's credentials.
The helper submits lists in batches of up to 1,000, rejects an empty list and rejects a single string where a list is expected. Its return value is not a per-token validity report. The CLI's displayed count describes the values submitted, not an independently confirmed count of active tokens invalidated.
Revocation is different from local logout
A local logout changes a client's stored authentication state. A revocation request concerns a credential's server-side use. Confusing the two can leave a leaked credential usable elsewhere even though one machine no longer selects it.
The versioned CLI documentation says that possession of the raw value is sufficient to request revocation and that the owner is notified by email. Those are described effects of using the feature; we did not invoke it, provide any token or send a revocation request.
Our analysis: the useful design choice is to separate a narrowly specified response action from a logged-in session. Suppressing the usual authorization header reduces one class of operational mistake, while a non-enumerating response avoids turning the acknowledgment into an account-discovery signal.
That still leaves application responsibilities outside this helper. A generic accepted request does not establish that a secret was removed from old logs, that every deployment has a replacement credential, or that no earlier misuse occurred. The feature should not be described as automatic incident remediation.
The SDK is Apache 2.0-licensed. Our repository profile links the source. We reviewed the release, versioned documentation and tagged CLI/helper code. We did not run the command, inspect local credentials, alter an account or test the production endpoint.
EXPLORE THE SOURCE
Projects in this story
GitHub repositories
- huggingface/huggingface_hub ↗View project details
Original primary-source-reviewed reporting. No software installation, weights/downloads, credential revocation, graph operations, model inference, upstream test execution or benchmark reproduction performed.





