Repository navigation
feat(console): list connected apps on the profile and revoke them - #3623
Merged
Merged
Conversation
The profile gets a Connected apps section that reads the person's consents
(GET /users/me/consents) and shows each client by the host of its client
document, or by its client ID, with the scopes granted and when. Revoke asks
first, then calls DELETE /users/me/consents/{id}, which ends the client's
refresh tokens, and reloads the list. A failed read says so and keeps the
rest of the profile.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Revocation messaging overstates its effect because other resource consents and personal access tokens remain active, while truncated scope lists prevent users from inspecting all granted permissions.
3 open issues
What changed in this PR
Adds Connected apps to the console profile, using the existing consent APIs to list approvals and revoke access after confirmation.
Changes:
- Displays client names, granted scopes, and approval dates, with empty and error states.
- Adds confirmed revocation and refreshes the list afterward.
- Adds tests, shared mocks, and a server changeset.
| File | Description |
|---|---|
apps/console/src/test/msw.ts |
Defaults consent requests to an empty list. |
apps/console/src/routes/_authed/account/profile.spec.tsx |
Tests listing, errors, confirmation, and cancellation. |
apps/console/src/routes/_authed/account/index.tsx |
Loads consents and renders Connected apps. |
apps/console/src/features/consents/model.ts |
Defines the consent type and client labels. |
apps/console/src/features/consents/model.spec.ts |
Tests client-label formatting. |
apps/console/src/features/consents/components/connected-apps.tsx |
Implements consent rows and revocation confirmation. |
apps/console/src/features/consents/api.ts |
Adds paginated reads and revocation calls. |
.changeset/console-connected-apps.md |
Records the feature for release notes. |
Review effort: Balanced
One row per client: an app allowed for two APIs held two consents, and Revoke ended one, so the other skipped consent at its next sign-in. Revoke now ends each of the app's consents and the personal access tokens it created, which outlive a consent; the dialog names them, and says so when they could not be read. Scopes wrap instead of being clipped. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Context
listMyConsentsandrevokeMyConsent, which this view reads and calls)Summary
/account, opened from the account menu) gets a Connected apps section after Sign-in methods. It lists every app or agent the person allowed to act for them, one row per client however many APIs it asked for:DELETE /users/me/personal_access_tokens/{id}), then each of the app's consents (DELETE /users/me/consents/{id}, which ends the client's refresh tokens), then reloads the list. PATs go first, so a failure leaves the app listed and Revoke can be retried; a 404 counts as already revoked.tkn.pat_owner_not_platformanswer reads as none.apps/console/src/features/consents/(model.ts,api.ts,components/connected-apps.tsx). It reusesConfirmDialogand the sign-in method row styles; the console's API client adds the CSRF header to the DELETEs.Validation
pnpm exec biome check apps/console/src: clean.tsc --noEmit -p apps/console: passes.pnpm exec vitest run src/routes/_authed/account src/features/consents: 27 passed. The specs cover:pnpm exec vitest runinapps/console: 72 files, 1201 tests passed.node scripts/check-pr-title.mjs --title "feat(console): list connected apps on the profile and revoke them": ok.Release notes / changeset
.changeset/console-connected-apps.md(@zitadel/server, minor). The console's profile lists Connected apps, each once with the scopes granted, when, and the PATs it created. Revoke asks first, then ends all of that app's access, and the app has to ask again at its next sign-in.Notes
revokeMyConsentrequires. It does not re-prove a credential; whether revoking should ask for one is part of the consent policy follow-up already noted.revokeMyConsent. Should the server end them with the consent too, for every caller? That is a server change worth deciding separately./users/me/consents, so that is an SDK helper and docs, not a server change.https://claude.ai/code/session_0137eGmVSt2DgYJj2CjZbi1U
Generated by Claude Code