Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Don't resolve the user's token in revoke_tokens
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • Loading branch information
Wauplin and claude committed Nov 19, 2026
commit 77676b09114aa037e9e50b1e3901a099e830dddc
3 changes: 1 addition & 2 deletions src/huggingface_hub/_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ def revoke_tokens(tokens: list[str]) -> None:
raise ValueError("`tokens` must be a list of tokens, not a single string.")
if not tokens:
raise ValueError("No token to revoke.")
headers = build_hf_headers()
headers.pop("authorization", None)
headers = build_hf_headers(token=False)
for i in range(0, len(tokens), _REVOKE_TOKENS_BATCH_SIZE):
response = get_session().post(
f"{constants.ENDPOINT}/api/credentials/revoke",
Expand Down
Loading