Group OAuth2 consent scopes into a collapsible section#3092
Conversation
The console OAuth2 consent screen rendered every requested scope as a flat list. For broad requests (e.g. account.admin plus dozens of granular console scopes) this produced an unusably long list. Group granular scopes by resource and tuck them into a single collapsible "App permissions" accordion, with read/write shown as compact tags. The account.admin full-access row and the OIDC identity scopes stay as always-visible rows above it. Also bump @appwrite.io/console to 15.1.0, let the consent layout scroll a tall card, and forward the resource indicator param through authorize.
Greptile SummaryReworks the OAuth2 consent screen to replace a long flat scope list with a collapsible "App permissions" accordion grouped by resource.
Confidence Score: 5/5Safe to merge — the scope grouping logic is correct and consistent with the pre-existing describeConsentScopes, the layout change is straightforward CSS, and the resource parameter forwarding uses the standard params.get form. The new groupConsentScopes helper correctly handles all scope variants, deduplicates actions, and preserves the openid-only fallback. The consent card refactor only affects presentation, not which grant is approved or what token is issued. Only a minor cosmetic padding asymmetry was found. consent-card.svelte — the .scope-group-list missing padding-inline-start may leave icons slightly misaligned inside the accordion, but this has no functional impact. Important Files Changed
Reviews (2): Last reviewed commit: "(fix): read the resource indicator from ..." | Re-trigger Greptile |
What
Reworks the console OAuth2 consent screen so a broad scope request renders cleanly instead of as an endless flat list.
Before, every requested scope was a separate row. A request for
account.adminplus the dozens of granular console scopes (teams.read,teams.write,project.read, …) produced a list that ran far past the fold.Now:
account.admin(full access) and the OIDC identity scopes (openid/profile/email) stay as always-visible rows at the top.Read/Writetags.Notes
approveendpoint has noscopesparameter — it always issues the token with the scopes frozen at authorize time — so per-scope selection would be cosmetic. Deferred until the server supports downscoping.@appwrite.io/consoleto the published15.1.0, lets the consent layout scroll a tall card instead of clipping it, and forwards the RFC 8707resourceindicator throughauthorize.Implementation
src/lib/helpers/oauth2-scopes.ts— newgroupConsentScopes()that splits granular scopes into{ admin, identity, groups }, bucketing by resource prefix (handles multi-segment resources likebackups.policies.read).src/routes/(public)/oauth2/consent-card.svelte— renders the admin/identity rows plus the grouped accordion.Verification
bun run format,bun run check(0 errors), andbun run lint(0 errors) all pass.