Skip to content

fix(oauth): allow client_secret_post and none on the revocation endpoint - #1061

Open
ratomirjovanovic wants to merge 2 commits into
authlib:mainfrom
ratomirjovanovic:fix/1057-revocation-auth-methods
Open

ratomirjovanovic wants to merge 2 commits into
authlib:mainfrom
ratomirjovanovic:fix/1057-revocation-auth-methods

Conversation

@ratomirjovanovic

@ratomirjovanovic ratomirjovanovic commented Nov 15, 2026 •

Copy link
Copy Markdown

Closes #1057

RevocationEndpoint now sets CLIENT_AUTH_METHODS = ["client_secret_basic", "client_secret_post", "none"], as suggested in the issue. IntrospectionEndpoint keeps the TokenEndpoint default. I documented the default and how to narrow it on the RFC 7009 page.

New tests in tests/flask/test_oauth2/test_revocation_endpoint.py: revoke with client_secret_post, with a wrong client_secret_post secret (still invalid_client), with a public client, and with a subclass limited to client_secret_basic. The client_secret_post and public client tests fail without the change.

Updated with current main. Since ae75ea5 a confidential client can't use none here, so the mixin caveat that was in this description no longer applies.

Ran uv run --all-groups pytest tests docs (2891 passed, 49 skipped) and prek run --all-files.

RevocationEndpoint inherited CLIENT_AUTH_METHODS = ["client_secret_basic"]
from TokenEndpoint, so client_secret_post and public clients got
invalid_client. Per RFC 7009 section 2.1 and section 5, public clients
can revoke their tokens too. IntrospectionEndpoint keeps its default.

Closes authlib#1057
…uth-methods

# Conflicts:
#	tests/flask/test_oauth2/test_revocation_endpoint.py

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RevocationEndpoint only allows client_secret_basic by default

1 participant