Skip to content

Choose the grant type and add the client credentials grant - #13

Merged
azmeuk merged 2 commits into
authlib:mainfrom
azmeuk:feat/client-credentials
Nov 5, 2026
Merged

azmeuk merged 2 commits into
authlib:mainfrom
azmeuk:feat/client-credentials

Conversation

@azmeuk

@azmeuk azmeuk commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

The tokens page now has a grant type selector. Each grant type has its own form, with a live preview of its request. A grant type the provider does not advertise can still be used, with a warning.

The first new grant is client credentials. It gets tokens for the client itself, without any user. A public client gets a warning, since this grant is meant for confidential clients. Dynamic registration can now request this grant.

The last setup step is now called Tokens, because not every flow has a user session. The pages move from /session to /tokens/request, /tokens/current and /tokens/logout. Client tokens have no logout tab, but a button to forget them.

Authlib keeps only the last value of a repeated token request parameter, such as several resource values. A small client subclass works around this until it is fixed upstream.

Part of #2

The preview field takes a function that builds the request. It shows a
GET request with its query string, and a POST request with its headers
and body.
The tokens page has a grant type selector, grouped by kind. Each grant
type has its own form, with a live preview of its request. A grant type
the provider does not advertise can still be used, with a warning.

The client credentials grant gets tokens for the client itself, without
any user. Repeated extra parameters, like several resource values, are
all sent.

The third setup step is now called Tokens, and the session pages move
from /session to /tokens: request, current and logout. Client tokens
have no logout tab, but a button to forget them.
@azmeuk
azmeuk force-pushed the feat/client-credentials branch from d78f5c2 to 07ddb7c Compare November 5, 2026 23:27
@azmeuk
azmeuk merged commit 18d9d48 into authlib:main Nov 5, 2026
13 checks passed
@azmeuk
azmeuk deleted the feat/client-credentials branch November 5, 2026 23:30
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.

1 participant