Repository navigation
fix(api): skip no consent step in the hosted cloud until the Console revokes - #3583
Conversation
Amend ADR 082 (Proposed): a consent is remembered per person, client and API. A client whose identity is assured (a secret, or an https answer) skips the step for what it was granted; a client that returns to a loopback address or a private-use scheme is asked each time with the last choice ticked. Scopes of operations that return a credential are never remembered. A person lists and revokes their consents, and a revoke ends the client's refresh grants. ADR 092 points to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
…rompt A consents table in the three dialects, one row per person, client and API (ADR 082, amendment of 2026-12-02): the scopes the person granted and the ones they declined, a digest of the client, the session and time of the last answer, and an expiry. Revoking one deletes it and the client's refresh grants for the person in one transaction. The authorization request keeps its prompt for the flow to read. stmttest covers the statements on every dialect, and ADR 047 registers the consent prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
…o the policy work A remembered consent holds the person's answer for every scope offered, yes or no, so a client that asks for everything skips the step once the person answered, and is issued the scopes answered yes. A scope that is never remembered no longer forces the step: a skip does not issue it. A declined scope is asked for again with prompt=consent after the API's auth.scope_insufficient refusal. How long a consent lasts, and whether use renews it, is left open for the policy work; the me operations become two tools once #3559 lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
… with it The consent step stores the person's answer, granted or declined per scope offered (ADR 082, amendment of 2026-12-02). On the next request a client whose identity is assured (a secret, or an https answer off the person's device) skips the step when every scope asked was answered, and its code carries the scopes answered yes. A client that holds no secret and returns to a loopback address or a private-use scheme sees the step each time, ticked as the person last answered. A new scope, a changed client, prompt=consent or an expired consent shows the step. Scopes of operations that return a credential are never remembered. The authorization endpoint keeps the request's prompt for the flow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
listMyConsents (GET /users/me/consents) lists what the signed-in person
consented to OAuth clients doing, the last answered first, with the
scopes granted and declined and when the consent expires.
revokeMyConsent (DELETE /users/me/consents/{consent_id}) deletes one
and ends every refresh token its client holds for the person, so the
client is asked again at its next sign-in (ADR 082, amendment of
2026-12-02). Both take the session cookie, like the other me
operations, so the MCP endpoint offers neither as a tool.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
The Enable OAuth guide says which clients are asked once and which every time, and how a person lists and revokes a consent. ADR 082's amendment says the me operations take the session cookie until #3559 lets them take a person's token. The changeset covers the three code pieces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
main renumbered the migrations (#3551) and marks a person's own operations x-zitadel-self (#3559, #3560). listMyConsents takes the mark and a person's token with user.read; revokeMyConsent takes the mark and stays with the session cookie, as revokeMySession does. Generated files regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
Amend ADR 082 (Proposed): a consent is remembered per person, client and API. A client whose identity is assured (a secret, or an https answer) skips the step for what it was granted; a client that returns to a loopback address or a private-use scheme is asked each time with the last choice ticked. Scopes of operations that return a credential are never remembered. A person lists and revokes their consents, and a revoke ends the client's refresh grants. ADR 092 points to it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
…o the policy work A remembered consent holds the person's answer for every scope offered, yes or no, so a client that asks for everything skips the step once the person answered, and is issued the scopes answered yes. A scope that is never remembered no longer forces the step: a skip does not issue it. A declined scope is asked for again with prompt=consent after the API's auth.scope_insufficient refusal. How long a consent lasts, and whether use renews it, is left open for the policy work; the me operations become two tools once #3559 lands. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
Brings in main with personal access tokens (#3563), so PR 2 can stack on the ADR's branch. A scope granted only on the consent step (personal_access_token.create, domain.ConsentRequired) is never remembered and always shows the step, to a first-party client too; the ADR says so. Generated files regenerated; sets_test lists both the token tools and listMyConsents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
…odes on revoke From review of #3574: - A consent given to a client before its document changed is no consent: its answers neither tick the step nor carry over into what the person answers the changed client. - Revoking a consent also deletes the client's authorization requests for the person that hold an unredeemed code, in the same transaction on all three dialects, so a code issued before the revoke buys no token after. - Only a redirect off the person's device assures a public client: a trailing dot, localhost subdomains, the unspecified address and numeric IPv4 forms (127.1, 2130706433, 0x7f.1) count as the device. The check is the consent rule's own; IsLoopbackOrigin is unchanged for its other callers. - Tests for each, and for the first-party answer that stores nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
…on the device, end consents on a password reset The user's decisions on #3574's review (D1-D3): - A request that names a scope a consent never remembers (one that returns a credential, or is granted only on the step) shows the step, ticked as answered: a skip never leaves out a scope the request named. An ask-everything client therefore sees the step at every sign-in; the ADR says so and leaves a scope of their own for those operations open, and no longer leans on prompt=consent as MCP's step-up. - A client whose identity is not assured starts with no delete scope ticked, whatever the person answered before. - setUserPassword, the reset by which a person gets back a lost account today, revokes every consent of theirs in the same transaction, with each client's refresh grants and unredeemed codes. The ADR records that a future self-service recovery must do the same, and a Console revoke surface as a condition before the skip is on for the hosted cloud. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
listMyConsents and revokeMyConsent are a person's own operations, on their own credential (revoking on their session only); the CLI's api-coverage test listed them as neither called nor explained. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
The amendment as the code's pull request now has it: a consent given to a client whose registration has changed counts as none; a revoke also ends the client's unredeemed codes; a request that names a scope that is never remembered always shows the step, so a client that asks for every listed scope is asked each time; delete scopes start unticked on the person's device; a password set ends the person's consents; and what a password set ends, like a consent's lifetime, is left to the policy work. A person reaching revoke from the Console is a condition before the skip is switched on for the hosted cloud. The text was written in the session https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf and is taken from its branch unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
…onsent Brings in main at eaced99 (#3552, #3562, #3564). The CLI's api-coverage test keeps only the two consent operations as not called: the personal access token commands now call theirs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
The ADR text it carries is on this branch through claude/remembered-consent-adr. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
…ndex Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
Brings in #3570 (a password set ends personal access tokens). The consent Spanner migrations sit behind its 000069 as 000070 and 000071. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
…revokes ADR 082 makes reaching revocation from the Console a precondition of the hosted cloud's skip. oauth.consent_skip (on by default) gates the skip; the cloud launcher sets it off, so the step is shown there with the person's last answer ticked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf # Conflicts: # apps/api/cmd/server/server.go # apps/api/internal/service/flow_auth_request.go # apps/api/internal/service/flow_auth_request_remembered_test.go # apps/api/internal/service/flow_engine.go
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmUEzNb3SNs7Rj5USYf
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🦋 Changeset detectedLatest commit: eec65d4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
🟡 Changes recommended
The new consent-skip changeset duplicates an existing unreleased entry and must be merged into it, preserving the minor bumps for both packages.
1 open issue
What changed in this PR
Adds a deployment switch for remembered-consent skipping, following #3574. Hosted cloud defaults it off until consent revocation is available in the Console; self-hosted defaults remain unchanged.
Changes:
- Adds and wires
oauth.consent_skip, defaulting totrue. - Disables skipping by default in the cloud launcher while preserving remembered selections.
- Adds regression tests, configuration documentation, and a release note.
| File | Description |
|---|---|
docs/quick-start/configuration.md |
Documents the switch and cloud behavior. |
apps/api/internal/service/flow_engine.go |
Passes the switch into consent handling. |
apps/api/internal/service/flow_auth_request.go |
Gates remembered-consent skipping. |
apps/api/internal/service/flow_auth_request_remembered_test.go |
Tests showing consent with remembered selections. |
apps/api/cmd/server/server.go |
Sets the default and wires configuration. |
apps/api/cmd/server/config.go |
Defines the configuration field. |
apps/api/cmd/cloud-launcher/main.go |
Defaults cloud consent skipping to off. |
apps/api/cmd/cloud-launcher/main_test.go |
Asserts the cloud default. |
.changeset/oauth-consent-skip.md |
Adds a server release note. |
Review effort: Balanced
| --- | ||
| "@zitadel/server": patch | ||
| --- |

Context
Summary
oauth.consent_skip(NEXTGEN_OAUTH_CONSENT_SKIP), on by default, so self-hosted behaviour is unchanged. With it off, every client is asked, with the person's last answer ticked.false, and its environment test asserts that.oauth.consent_skiprow.Validation
Run by the writing session:
go build; the service, cloud-launcher andcmd/serverpackages; the SQLite integration lane.Release notes / changeset
.changeset/oauth-consent-skip.md,@zitadel/serverpatch.Notes
Generated by Claude Code