Skip to content

feat(login): group the OAuth consent screen's scopes into view, change and delete sections - #3557

Merged
fforootd merged 7 commits into
mainfrom
feat/consent-by-access
Dec 2, 2026
Merged

fforootd merged 7 commits into
mainfrom
feat/consent-by-access

Conversation

@peintnermax

@peintnermax peintnermax commented Dec 2, 2026 •

Copy link
Copy Markdown
Member

Context

Summary

A client that asks for many scopes (an MCP client asks for 28) got a paragraph of group names while the choice was closed, and one long list of checkboxes once "Change" opened it. This PR lays the choice out by what the client may do.

  • A section per access. The scopes are in three sections: what the client may view, what it may create and change, what it may delete. A section is one line: a checkbox, how many of its scopes are granted ("16 of 16"), and a button that opens its scopes.
  • A section's checkbox grants or withdraws all of it, and shows as mixed while only some of its scopes are ticked. It replaces the "Read only" and "Everything requested" presets and the "Change" button.
  • What a client may change or delete is decided without opening anything. The defaults are unchanged: reading and staying connected start ticked, every change and delete takes a deliberate tick, and Allow stays disabled until one API scope is ticked.
  • Who asks reads as one block. Client, publishing host, redirect host and API are label and value on one line, with the labels in one column. A value too long for its line wraps in full, so the end of a host is never hidden and nothing needs a tooltip to be read.
  • The device warning is shown after those rows, so it no longer splits them. It stays in the redirect host's row in the markup, so a screen reader reads it with that host.
  • Staying connected is set off from the sections, and its hint breaks into even lines.

Screenshot

The default story in Storybook, dark, with the View section opened:

The consent screen: who asks as label and value rows, then a View section opened to its two scopes, closed Create and change and Delete sections, and the stay connected choice

Validation

Run at the repo root:

  • turbo run lint typecheck test --filter=@zitadel/components --filter=@zitadel/config --filter=@zitadel/storybook on the first commit: 18 of 18 tasks passed, including the components' unit, edge and browser projects and Storybook's render and accessibility gate.
  • After the three styling commits: biome check packages/components/src/atoms, the consent unit and browser specs (zl-consent.spec.ts, zl-consent.browser.spec.ts, zitadel-login-auth-request.browser.spec.ts) and turbo run test --filter=@zitadel/storybook.
  • In Storybook (Atoms/Consent), with a 28-scope request loaded into the story: closed, one section opened, one scope unticked (the section shows as mixed), and the device warning on.

Not run: the full suite after the last three commits, the e2e lanes, and a real sign-in against a server. The Storybook gate runs the default story, which has the device warning off.

Release notes / changeset

  • Changeset: .changeset/oauth-sign-in-consent.md, reworded in place. The consent step is unreleased, so its note now describes the sections and no new changeset is added (@zitadel/components, @zitadel/config).

Notes

  • More Tab stops before Allow. Closed, the choice was one stop ("Change"). It is now up to seven: a checkbox and a button per section, and staying connected.
  • Attributes and texts renamed. <zl-consent> loses presets-label, read-only-label, everything-label, change-label, granted-label, granted-none-label, stay-connected-label and granted-view/edit/delete-label, and gains view-label, edit-label, delete-label, count-label and details-label (consent.access.read, .change, .delete, consent.count, consent.details). The parts change with them. Nothing released carries the old names.
  • Group names are no longer shown. A section lists scope lines ("View users"), so the atom does not show consent.group.<group>. The console still ships those texts and TestPersonScopesHaveConsentTextsInTheConsole still requires them; both are left for a follow-up.
  • German and Italian wording of the new texts needs a native check.
  • A long API identifier takes more lines. No value is cut, so an identifier longer than its line wraps, up to three lines for a long host at the card's width.

🤖 Generated with Claude Code

peintnermax and others added 4 commits December 2, 2026 08:47
The choice of scopes was one line of what is granted and a "Change" button
that opened every scope at once, grouped by resource. A client that asks for
many scopes got a paragraph of group names closed, and a long list open.

The scopes are now in a section per access: what the client may view, what
it may create and change, what it may delete. A section is one line: a
checkbox that grants or withdraws all of it (mixed while only some of it is
granted), how many of its scopes are granted, and a button that opens them.
So what a client may change or delete is seen and decided without opening
anything. The section checkboxes replace the "Read only" and "Everything
requested" presets.

Who asks and where the answer goes read as one short block, label beside
value; a value too long for its line wraps under its label.

The atom's `presets-label`, `read-only-label`, `everything-label`,
`change-label` and `granted-*-label` attributes and their texts are gone;
`view-label`, `edit-label`, `delete-label`, `count-label` and
`details-label` (`consent.access.*`, `consent.count`, `consent.details`)
take their place. The consent step is unreleased, so its changeset is
reworded in place.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ctions and balance its hint

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…l's line

A value too long for its line, such as the API's identifier, wrapped under
its label, unlike the rows above it. Every row is now label and value on one
line; a long value is cut with an ellipsis at its end and shows in full on
hover.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…rows

The warning sat between where the answer goes and the API, which split the
rows of values. The summary is now one grid whose rows share a label column,
and the warning is shown after the last of them. It stays in the row of the
host it is about, so a screen reader still reads it with that host.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@vercel

vercel Bot commented Dec 2, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cloud Ready Ready Preview Dec 2, 2026 1:04pm UTC

Request Review

Copilot AI balanced review requested due to automatic review settings December 2, 2026 07:58
@zitadel-kanban zitadel-kanban Bot moved this to Inbox in Engineering Kanban Dec 2, 2026
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

🦋 Changeset detected

Latest commit: 3f5a715

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 27 packages
Name Type
@zitadel/server Minor
@zitadel/api Minor
@zitadel/components Minor
@zitadel/config Minor
@zitadel/cli Minor
@zitadel/sdk-angular Minor
@zitadel/sdk-core Minor
@zitadel/sdk-next Minor
@zitadel/sdk-nuxt Minor
@zitadel/sdk-qwik Minor
@zitadel/sdk-react Minor
@zitadel/sdk-solid Minor
@zitadel/sdk-svelte Minor
@zitadel/sdk-tanstack-start Minor
@zitadel/sdk-vue Minor
@zitadel/testing Minor
@zitadel/cloud Patch
@zitadel/client-sdk-contract Patch
@zitadel/sdk-qwik-router Minor
@zitadel/sdk-solid-start Minor
@zitadel/sdk-sveltekit Minor
@zitadel/server-sdk-contract Patch
@zitadel/server-darwin-arm64 Minor
@zitadel/server-darwin-x64 Minor
@zitadel/server-linux-arm64 Minor
@zitadel/server-linux-x64 Minor
@zitadel/server-win32-x64 Minor

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Hostname truncation hides security-critical suffixes, preventing touch users from distinguishing trusted domains from attacker-controlled ones before granting access.

1 open issue
What changed in this PR

Refines the login components’ OAuth consent screen with access-based sections, preserving existing scope-selection defaults.

Changes:

  • Replaces presets with expandable view, change and delete sections, each with a bulk checkbox and grant count.
  • Aligns client identity rows and repositions the device warning.
  • Updates templates, translations, tests, component metadata and documentation.
File Description
packages/​config/​defaults/​branding/​minimal/​login.liquid Uses section labels in the minimal design.
packages/​config/​defaults/​branding/​centered/​login.liquid Uses section labels in the centered design.
packages/​components/​src/​orchestrator/​zitadel-login-auth-request.spec.ts Updates consent count and focus assertions.
packages/​components/​src/​orchestrator/​zitadel-login-auth-request.browser.spec.ts Updates keyboard navigation checks.
packages/​components/​src/​orchestrator/​templates/​default.liquid Passes the new consent labels.
packages/​components/​src/​orchestrator/​mandatory-gates.spec.ts Checks section-label injection and overrides.
packages/​components/​src/​orchestrator/​locales/​it.ts Adds Italian section wording.
packages/​components/​src/​orchestrator/​locales/​en.ts Adds English section wording.
packages/​components/​src/​orchestrator/​locales/​de.ts Adds German section wording.
packages/​components/​src/​orchestrator/​design-templates.spec.ts Verifies labels across shipped designs.
packages/​components/​src/​orchestrator/​consent-choices.ts Maps localized section attributes.
packages/​components/​src/​atoms/​zl-consent.ts Implements section selection, counts and expansion.
packages/​components/​src/​atoms/​zl-consent.spec.ts Covers section behavior and accessibility markup.
packages/​components/​src/​atoms/​zl-consent.css Styles sections, identity rows and warning placement.
packages/​components/​src/​atoms/​zl-consent.browser.spec.ts Updates keyboard and disabled-control coverage.
packages/​components/​README.md Documents the revised consent interface.
packages/​components/​custom-elements.json Updates generated component metadata.
docs/​design/​branding/​component-capability-map.md Describes access-based consent sections.
apps/​storybook/​src/​consent.stories.ts Updates comments and control descriptions.
apps/​docs/​content/​docs/​guides/​customize-design.mdx Lists the revised styling parts.
.changeset/​oauth-sign-in-consent.md Revises the pending consent release note.

Review effort: Balanced

The ellipsis for a value too long for its line also applied to the client's
name and to the hosts, where it would hide the end of a host: the part that
tells a trusted site from one that only starts like it. On a touch device
the full value, a tooltip, cannot be read. Names and hosts now wrap in full,
and only the API's identifier is cut.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…full

No value in the summary is cut any more, so the end of a host is always
shown and nothing depends on a tooltip, which a touch device does not show.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…nd chevron

A checkbox sat above the middle of its label's line, an opened section's
scopes had more room below than above, and the chevron's square, not its
arrow, was in the middle of its button.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@fforootd
fforootd added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 77611f1 Dec 2, 2026
18 checks passed
@fforootd
fforootd deleted the feat/consent-by-access branch December 2, 2026 14:04
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Dec 2, 2026

This branch was successfully deployed

1 active deployment
Preview — 3f5a7150 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants