Skip to content

feat(ui): Show OAuthConsent org selector from user:org:read scope#8415

Open
wobsoriano wants to merge 4 commits intomainfrom
rob/user-5239-sdk-should-use-new-scope-for-displaying-org-selector
Open

feat(ui): Show OAuthConsent org selector from user:org:read scope#8415
wobsoriano wants to merge 4 commits intomainfrom
rob/user-5239-sdk-should-use-new-scope-for-displaying-org-selector

Conversation

@wobsoriano
Copy link
Copy Markdown
Member

Description

Replaces the __internal_enableOrgSelection flag with a scope-based check. The org selector now renders when user:org:read is present in the granted scopes, and that scope is filtered from the visible scopes list alongside offline_access.

Resolves USER-5239

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 28, 2026

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Apr 28, 2026 5:08pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 28, 2026

🦋 Changeset detected

Latest commit: b92f37b

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

This PR includes changesets to release 2 packages
Name Type
@clerk/ui Minor
@clerk/chrome-extension Patch

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

@github-actions github-actions Bot added the ui label Apr 28, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 7672706d-3023-4520-b5fb-b4ae814ffaac

📥 Commits

Reviewing files that changed from the base of the PR and between 115cf98 and b92f37b.

📒 Files selected for processing (3)
  • .changeset/fluffy-readers-strive.md
  • packages/ui/src/components/OAuthConsent/OAuthConsent.tsx
  • packages/ui/src/components/OAuthConsent/__tests__/OAuthConsent.test.tsx

📝 Walkthrough

Walkthrough

This pull request introduces a scope-based mechanism for controlling organization selection in the OAuthConsent component. The user:org:read scope now gates the org selector's availability, replacing previous conditional logic. The component additionally filters out this scope from the displayed consent scope list. A changeset entry documents the minor version bump, and the test suite is updated to validate behavior through scope presence/absence in mocked consent info rather than reliance on internal configuration flags.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: the org selector in OAuthConsent now renders based on the user:org:read scope rather than an internal flag.
Description check ✅ Passed The description directly relates to the changeset, explaining the replacement of the internal flag with scope-based logic and mentioning the scope filtering, which aligns with the code changes.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 28, 2026

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8415

@clerk/expo

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: b92f37b

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.

1 participant