mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-12-03 15:54:54 +00:00
A new `authorization_grant/skip_consent` entrypoint returns whether an authorization code grant is approved without asking the user. The consent page evaluates it after the violation check, and if it's true, approves the grant and redirects to the client as the Allow button does. The default policy skips consent only when `policy.data.skip_consent` is set and all of these hold: - the grant is an authorization code grant, not a device code grant; - it asks for nothing beyond `openid` and the Matrix C-S API and device scopes, and passes the violation check; - the account was created within `max_account_age_seconds`; - the user has no active sessions; - the client is listed in `client_ids`, when that list is set. Without that data nothing changes. Listing clients is what keeps the code with a known client: an operator sets a static client's redirect URIs, while a dynamically registered client chooses its own. Without the list, any client qualifies. The age and session conditions narrow the skip to the first sign-in right after registering, when the consent screen tells a new user nothing. The entrypoint is required, as the existing ones are, so a custom `policy.wasm` must define it: `default skip_consent := false` is enough. A rule left undefined counts as `false`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FqDpJaaUkGGq5GiEbU9G3f