Skip to content

feat(ui): prompt for reverification before deleting an organization - #10871

Merged
gabrielmeloc22 merged 1 commit into
mainfrom
gabriel/orgs-2087-require-reverification-to-delete-an
Nov 18, 2026
Merged

gabrielmeloc22 merged 1 commit into
mainfrom
gabriel/orgs-2087-require-reverification-to-delete-an

Conversation

@gabrielmeloc22

@gabrielmeloc22 gabrielmeloc22 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

Deleting an organization from <OrganizationProfile /> doesn't ask the user to reverify, even on instances that require reverification for sensitive actions. Deleting your own account already does. The backend is adding reverification to DELETE /v1/organizations/{id}. If this component stays as it is, users on those instances would get an error when they try to delete an org, and no verification modal.

This wraps the delete action in useReverification, the same way DeleteUserForm wraps user.delete(). If FAPI returns session_reverification_required, the verification modal opens, and the delete retries after the user verifies. Nothing changes on instances without reverification.

This needs to ship before the backend PR (clerk/clerk_go#24274). Otherwise older versions of this component fail to delete an org with no prompt.

Checklist

  • pnpm test runs as expected. (Ran the OrganizationProfile delete/leave tests. The new test fails without the fix.)
  • pnpm build runs as expected.

Type of change

  • 🐛 Bug fix

Part of ORGS-2087

Deleting an organization from <OrganizationProfile /> called destroy() directly, so once FAPI requires reverification for it, users would get an error instead of the verification modal. The delete is now wrapped in useReverification, the same way account deletion is.

Part of ORGS-2087
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 17, 2026 6:40pm UTC
swingset Ready Ready Preview Nov 17, 2026 6:40pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

DeleteOrganizationForm now wraps organization deletion with useReverification. The test covers a reverification-required error, opening reverification, and a second deletion attempt after the afterVerification callback. A patch changeset documents the behavior.

Estimated code review effort: 2 (Simple) | ~8 minutes

Suggested reviewers: alexcarpenter, austincalvelage

Merge Risk: Minimal · up to 3010d

Deleting an organization now prompts for reverification when the instance requires it, and retries the deletion after verification. Instances without reverification are unaffected. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: organization deletion in OrganizationProfile now prompts for reverification. It follows the conventional feat(ui) format and matches the changeset, the ActionConfirmat…
Description check Passed The description explains the problem: deleting an organization from OrganizationProfile does not prompt for reverification on instances that require it. It states the fix, which wraps the delete actio…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: organization deletion in OrganizationProfile now prompts for reverification. It follows the conventional feat(ui) format and matches the changeset, the ActionConfirmationPage wrapping with useReverification, and the new test.

Full details: Description check

Explanation

The description explains the problem: deleting an organization from OrganizationProfile does not prompt for reverification on instances that require it. It states the fix, which wraps the delete action in useReverification, and it names the related backend PR and the test run. This matches the changeset and the code summaries.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: clerk/javascript
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 7fa8590
  • Layers: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 82e8423c-ca07-46d2-b34a-e34d95142fd3
Commits

Reviewing files that changed from the base of the PR and between 7fa8590 and 3010dca.

Files selected for processing: 3

  • .changeset/org-delete-reverification.md
  • packages/ui/src/components/OrganizationProfile/ActionConfirmationPage.tsx
  • packages/ui/src/components/OrganizationProfile/__tests__/DeleteOrganizationPage.test.tsx
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

@github-actions github-actions Bot added the ui label Nov 17, 2026
@gabrielmeloc22 gabrielmeloc22 changed the title fix(ui): prompt for reverification before deleting an organization feat(ui): prompt for reverification before deleting an organization Nov 17, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10871

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10871

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10871

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10871

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10871

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10871

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10871

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10871

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10871

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10871

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10871

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10871

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10871

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10871

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10871

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10871

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10871

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10871

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10871

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10871

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10871

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10871

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10871

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10871

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10871

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10871

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10871

commit: 3010dca

@gabrielmeloc22
gabrielmeloc22 requested a review from a team November 17, 2026 20:06
@gabrielmeloc22
gabrielmeloc22 marked this pull request as ready for review November 17, 2026 20:06
@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-11-17T20:10:01.708Z

Summary

Metric Count
Packages analyzed 20
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 3010dca.

@blacksmith-sh

blacksmith-sh Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Matches Org delete opens reverification, then retries

Before, the delete card showed the reverification error and nothing else; after, the Verification required modal opened and, once the password was submitted, the delete was retried and the card said the organization was deleted.

Merge-base

Delete flow

This PR 3010dca4

Delete flow

Proof on 3010dca4 · mocked: Clerk Frontend API (DELETE /v1/organizations only requires reverification once clerk/clerk_go#24274...) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

@gabrielmeloc22
gabrielmeloc22 merged commit dca6a65 into main Nov 18, 2026
142 of 144 checks passed
@gabrielmeloc22
gabrielmeloc22 deleted the gabriel/orgs-2087-require-reverification-to-delete-an branch November 18, 2026 13:06

This branch was successfully deployed

2 active deployments
Preview – swingset — 3010dca4 Deployed Nov 17, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 3010dca4 Deployed Nov 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants