Skip to content

fix(settings): confirm app-token revoke and preserve wipe state#60644

Open
pringelmann wants to merge 7 commits into
masterfrom
fix/app-token-delete-confirm
Open

fix(settings): confirm app-token revoke and preserve wipe state#60644
pringelmann wants to merge 7 commits into
masterfrom
fix/app-token-delete-confirm

Conversation

@pringelmann
Copy link
Copy Markdown
Contributor

@pringelmann pringelmann commented May 21, 2026

Summary

Revoking an app password now opens an NcDialog confirmation. For tokens marked for remote wipe the dialog uses a red error card and the destructive button reads "Revoke and cancel wipe", so cancelling an in-flight wipe is a deliberate click rather than a side effect of clicking the trash icon.

Two admin-only deletion paths used to drop the wipe marker the same way the user-facing controller did. Both are guarded now: occ user:auth-tokens:delete refuses wipe-pending tokens unless --cancel-wipe is passed, and OAuth2 client revocation skips matching wipe-pending tokens (with a log line) so the wipe outlives the client.

Backports needed for stable33, stable32, stable31.

Screenshot

Screenshot_2026-05-21_17-02-03

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Screenshots before/after for front-end changes
  • Documentation (manuals or wiki) has been updated or is not required
  • Backports requested where applicable (ex: critical bugfixes)
  • Labels added where applicable (ex: bug/enhancement, 3. to review, feature component)
  • Milestone added for target branch/version (ex: 32.x for stable32)

@pringelmann pringelmann added this to the Nextcloud 34 milestone May 21, 2026
@pringelmann pringelmann self-assigned this May 21, 2026
@pringelmann pringelmann marked this pull request as ready for review May 22, 2026 09:17
@pringelmann pringelmann requested review from a team as code owners May 22, 2026 09:17
@pringelmann pringelmann requested review from come-nc, nfebe, provokateurin, sorbaugh and susnux and removed request for a team May 22, 2026 09:17
Comment thread apps/settings/src/components/AuthTokenDeleteDialog.vue Outdated
Comment thread apps/settings/src/components/AuthTokenDeleteDialog.vue Outdated
Comment thread apps/settings/src/components/AuthTokenDeleteDialog.vue Outdated
Comment thread apps/settings/src/components/AuthTokenWipeDialog.vue Outdated
Copy link
Copy Markdown
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

functionality wise approved, some code comments

Comment thread apps/settings/src/components/AuthToken.vue Outdated
Comment thread apps/settings/src/components/AuthToken.vue Outdated
Comment thread apps/settings/src/components/AuthToken.vue Outdated
Adds an NcDialog confirmation to the Revoke action; deletion was
previously instant on click. When the token is marked for remote
wipe, the dialog surfaces a warning and the destructive button
switches to "Cancel wipe and revoke" so cancelling an in-flight
wipe is an explicit opt-in.

Also migrates the existing Wipe confirm from the legacy
window.OC.dialogs.confirm helper to NcDialog, matching the new
delete dialog. The auth token store actions are now pure API
callers; the UI does the gating.

Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
Signed-off-by: Peter Ringelmann <peter.ringelmann@nextcloud.com>
@pringelmann pringelmann force-pushed the fix/app-token-delete-confirm branch from ec56a07 to 01f5ecc Compare May 26, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews enhancement feature: settings team: IDP Code maintained by 🪪 IDP team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants