Skip to content

feat: add third_party_client_access to organization details edit - #469

Open
rax7389 wants to merge 2 commits into
mainfrom
feat/3p-org-details
Open

feat: add third_party_client_access to organization details edit#469
rax7389 wants to merge 2 commits into
mainfrom
feat/3p-org-details

Conversation

@rax7389

@rax7389 rax7389 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Add third_party_client_access setting to Organization Details Edit screen, allowing organizations to control whether third-party applications can authenticate their users.

Why

Organizations need the ability to control third-party application access at the organization level. This is Part 1 of the 3P Client Access feature (UIC-1380).

What

  • Add ThirdPartyAccessDetails component with RadioGroup (Block/Allow options)
  • Update useConfig hook to expose showThirdPartyAccess and thirdPartyAccess config
  • Add i18n translations for organization details third party access
  • Update organization details mappers and types to handle the new field

Packages

  • packages/core
  • packages/react
  • examples

Testing

image
  • This change adds unit test coverage
  • Tested for both SPA and RWA flows, all example apps working
  • All existing and new tests complete without errors

Checklist

  • Breaking change
  • Requires docs update
  • Backward compatible

Contributing

Summary by CodeRabbit

  • New Features

    • Added organization-level controls for allowing or blocking third-party application access.
    • Added configurable visibility, default selection, and read-only behavior for the setting.
    • Added localized labels, descriptions, validation messages, and accessibility support.
    • Organization settings now preserve and save the selected third-party access preference.
  • Tests

    • Added coverage for rendering, interactions, accessibility, customization, read-only behavior, and configuration-driven defaults.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@rax7389, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c411e090-1710-4076-9ab2-7ec1ac3e6652

📥 Commits

Reviewing files that changed from the base of the PR and between 0033fc5 and 306c96a.

📒 Files selected for processing (7)
  • auth0-myorganization-js-1.1.0.tgz
  • packages/core/package.json
  • packages/core/src/i18n/translations/en-US.json
  • packages/react/src/components/auth0/my-organization/organization-details-edit.tsx
  • packages/react/src/hooks/my-organization/__tests__/use-organization-details-edit.test.ts
  • packages/react/src/hooks/my-organization/use-organization-details-edit.ts
  • packages/react/src/types/my-organization/organization-management/organization-details-edit-types.ts
📝 Walkthrough

Walkthrough

The organization details flow now supports optional third-party client access values. Configuration controls visibility, read-only state, and defaults. The form renders allow/block options, validates submissions, maps values to API requests, and includes localization and tests.

Changes

Organization third-party access

Layer / File(s) Summary
Organization data and localization
packages/core/...
Organization types, schema validation, API mappers, messages, translations, and the local client package support optional allow or block values.
Configuration state propagation
packages/react/src/hooks/..., packages/react/src/types/..., packages/react/src/.../config.mocks.ts
Configuration derives visibility, read-only state, and default values. The organization edit hook exposes these fields.
Organization details form integration
packages/react/src/components/.../organization-details-edit.tsx, packages/react/src/components/.../organization-details.tsx, packages/react/src/types/..., packages/react/src/tests/utils/...
The edit flow passes configuration into the form, initializes third_party_client_access, and conditionally renders the new section.
Third-party access control UI
packages/react/src/components/.../third-party-access-details.tsx, packages/react/src/components/.../third-party-access-details.test.tsx
The new section renders translated allow/block radio options, helper text, validation feedback, accessibility attributes, styling, and read-only behavior.
Configuration validation
packages/react/src/hooks/.../__tests__/*
Tests cover configuration visibility, read-only selection, default values, and organization edit hook setup.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant OrganizationConfig
  participant useConfig
  participant useOrganizationDetailsEdit
  participant OrganizationDetails
  participant ThirdPartyAccessDetails
  participant OrganizationAPI

  OrganizationConfig->>useConfig: provide access configuration
  useConfig->>useOrganizationDetailsEdit: return visibility, read-only state, and default
  useOrganizationDetailsEdit->>OrganizationDetails: pass access configuration
  OrganizationDetails->>ThirdPartyAccessDetails: render configured form section
  ThirdPartyAccessDetails->>OrganizationDetails: update allow or block form value
  OrganizationDetails->>OrganizationAPI: submit mapped third_party_client_access
Loading

Possibly related PRs

Suggested labels: enhancement

Suggested reviewers: chakrihacker, harishsundar-okta

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.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
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the addition of third-party client access to the organization details edit screen.
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/3p-org-details

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (2)
packages/react/src/hooks/my-organization/shared/services/__tests__/use-config-service.test.ts (1)

154-237: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Use a when... condition group for the new cases.

The block starts with describe('thirdPartyAccess', ...). Rename it to a condition group such as describe('when evaluating third_party_client_access', ...). Use action-oriented it names such as returns false when ....

As per coding guidelines, condition groups must use when..., and it names must describe the action.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/react/src/hooks/my-organization/shared/services/__tests__/use-config-service.test.ts`
around lines 154 - 237, Rename the thirdPartyAccess describe block to a
when-prefixed condition group describing evaluation of
third_party_client_access, and update each test name to use action-oriented
wording such as “returns … when …” while preserving the existing assertions and
scenarios.

Source: Coding guidelines

packages/react/src/tests/utils/__mocks__/my-organization/config/config.mocks.ts (1)

17-19: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep one canonical configuration mock under internals.

This file duplicates createMockUseConfig from packages/react/src/internals/__mocks__/my-organization/config/config.mocks.ts. The two factories now duplicate the same three fields and can drift. Reuse the internals factory instead of maintaining two copies.

As per coding guidelines, reusable React test utilities and mocks must live under internals, including shared mocks under internals/__mocks__/.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@packages/react/src/tests/utils/__mocks__/my-organization/config/config.mocks.ts`
around lines 17 - 19, Remove the duplicate createMockUseConfig factory from the
tests utilities mock and reuse the canonical factory exported from
internals/__mocks__/my-organization/config/config.mocks.ts. Update imports and
consumers as needed so all tests use that shared mock, leaving configuration
fields maintained in only the internals factory.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/core/package.json`:
- Line 55: Update the dependency entry in packages/core/package.json to use a
published `@auth0/myorganization-js` version, and move the local
../../auth0-myorganization-js-1.1.0.tgz reference into a development-only
override so frozen-lockfile installs and publishing work from a clean checkout.

In `@packages/core/src/i18n/translations/en-US.json`:
- Line 903: Update the title value at the affected translation entry from “Third
party Application Access” to “Third-Party Application Access,” matching the
capitalization used by the corresponding entries around lines 256-257.

In
`@packages/core/src/services/my-organization/organization-management/organization-details-mappers.ts`:
- Line 27: Update the organization details mapping methods fromAPI and toAPI to
validate third_party_client_access at both API boundaries using the appropriate
Zod schemas from packages/core/src/schemas/. Parse the response value before
mapping it in fromAPI and parse the request value before sending it in toAPI,
preserving the existing mapping behavior for valid data.

In
`@packages/react/src/hooks/my-organization/__tests__/use-organization-details-edit.test.ts`:
- Around line 24-26: Extend the test setup around the mocked useConfig and the
public organization-details hook to return non-default configuration values,
then assert that showThirdPartyAccess, isThirdPartyAccessReadOnly, and
thirdPartyAccessDefaultValue in the hook result match those values.

In `@packages/react/src/hooks/my-organization/use-organization-details-edit.ts`:
- Around line 34-35: Update the useOrganizationDetailsEdit hook to destructure
isLoadingConfig from useConfig and pass isFetchLoading || isLoadingConfig to
GateKeeper, preventing form rendering until the third-party access default is
available.

---

Nitpick comments:
In
`@packages/react/src/hooks/my-organization/shared/services/__tests__/use-config-service.test.ts`:
- Around line 154-237: Rename the thirdPartyAccess describe block to a
when-prefixed condition group describing evaluation of
third_party_client_access, and update each test name to use action-oriented
wording such as “returns … when …” while preserving the existing assertions and
scenarios.

In
`@packages/react/src/tests/utils/__mocks__/my-organization/config/config.mocks.ts`:
- Around line 17-19: Remove the duplicate createMockUseConfig factory from the
tests utilities mock and reuse the canonical factory exported from
internals/__mocks__/my-organization/config/config.mocks.ts. Update imports and
consumers as needed so all tests use that shared mock, leaving configuration
fields maintained in only the internals factory.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b5a74f01-4dc8-4f64-8caf-2ebfeb21dc71

📥 Commits

Reviewing files that changed from the base of the PR and between 266e1ce and 0033fc5.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • packages/core/package.json
  • packages/core/src/i18n/custom-messages/my-organization/organization-management/organization-details-types.ts
  • packages/core/src/i18n/translations/en-US.json
  • packages/core/src/schemas/my-organization/organization-management/organization-details-schema.ts
  • packages/core/src/services/my-organization/organization-management/organization-details-mappers.ts
  • packages/core/src/services/my-organization/organization-management/organization-details-types.ts
  • packages/react/src/components/auth0/my-organization/organization-details-edit.tsx
  • packages/react/src/components/auth0/my-organization/shared/organization-management/organization-details/__tests__/organization-details.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/organization-management/organization-details/__tests__/third-party-access-details.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/organization-management/organization-details/organization-details.tsx
  • packages/react/src/components/auth0/my-organization/shared/organization-management/organization-details/third-party-access-details.tsx
  • packages/react/src/hooks/my-organization/__tests__/use-organization-details-edit.test.ts
  • packages/react/src/hooks/my-organization/shared/services/__tests__/use-config-service.test.ts
  • packages/react/src/hooks/my-organization/shared/services/use-config-service.ts
  • packages/react/src/hooks/my-organization/use-organization-details-edit.ts
  • packages/react/src/internals/__mocks__/my-organization/config/config.mocks.ts
  • packages/react/src/tests/utils/__mocks__/my-organization/config/config.mocks.ts
  • packages/react/src/tests/utils/__mocks__/my-organization/organization-management/organization-details.mocks.ts
  • packages/react/src/types/my-organization/config/config-types.ts
  • packages/react/src/types/my-organization/organization-management/organization-details-edit-types.ts
  • packages/react/src/types/my-organization/organization-management/organization-details-types.ts

"dependencies": {
"@auth0/myaccount-js": "1.0.0-beta.2",
"@auth0/myorganization-js": "1.1.0",
"@auth0/myorganization-js": "../../auth0-myorganization-js-1.1.0.tgz",

@coderabbitai coderabbitai Bot Aug 11, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

tarball='auth0-myorganization-js-1.1.0.tgz'
test -f "$tarball"
git ls-files --error-unmatch "$tarball" >/dev/null

Repository: auth0/auth0-ui-components

Length of output: 163


🏁 Script executed:

set -euo pipefail

printf '%s\n' '--- packages/core/package.json ---'
sed -n '1,90p' packages/core/package.json

printf '%s\n' '--- package and workspace metadata ---'
rg -n --hidden -g '!node_modules' -g '!dist' -g '!build' \
  '"(workspaces|packageManager|publishConfig|version|`@auth0/myorganization-js`)"|auth0-myorganization-js-1\.1\.0\.tgz' \
  package.json packages package-lock.json npm-shrinkwrap.json pnpm-lock.yaml yarn.lock .npmrc .github 2>/dev/null || true

printf '%s\n' '--- matching artifacts and tracked files ---'
find .. -maxdepth 3 -type f -name 'auth0-myorganization-js-1.1.0.tgz' -print
git ls-files | rg '(^|/)auth0-myorganization-js-1\.1\.0\.tgz$|(^|/)(package-lock\.json|npm-shrinkwrap\.json|pnpm-lock\.yaml|yarn\.lock)$' || true

printf '%s\n' '--- publish-related configuration ---'
rg -n --hidden -g '!node_modules' -g '!dist' -g '!build' \
  'npm publish|pnpm publish|yarn publish|npm pack|publishConfig|files:' \
  package.json packages .github .npmrc 2>/dev/null || true

Repository: auth0/auth0-ui-components

Length of output: 5763


🏁 Script executed:

set -euo pipefail

printf '%s\n' '--- publish workflow ---'
sed -n '150,260p' .github/workflows/publish-public-npm.yml

printf '%s\n' '--- root workspace metadata ---'
sed -n '1,90p' package.json

printf '%s\n' '--- core lockfile importer ---'
sed -n '530,565p' pnpm-lock.yaml

printf '%s\n' '--- package publish configuration ---'
rg -n -C 5 'pkg\.publishConfig|npm publish|pnpm install|pnpm deploy|packages/core|universal-components-core' .github/workflows/publish-public-npm.yml package.json packages/core/package.json

Repository: auth0/auth0-ui-components

Length of output: 30050


Keep the dependency publishable.

The publish workflow runs pnpm install --frozen-lockfile before npm publish. The referenced tarball is not present or tracked, so a clean workflow checkout cannot resolve the dependency. Use a published @auth0/myorganization-js version and keep the tarball in a development-only override.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/core/package.json` at line 55, Update the dependency entry in
packages/core/package.json to use a published `@auth0/myorganization-js` version,
and move the local ../../auth0-myorganization-js-1.1.0.tgz reference into a
development-only override so frozen-lockfile installs and publishing work from a
clean checkout.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

this will be handled before the merge

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@rax7389, thanks for the update. Please update the dependency and lockfile before merge. The thread remains open until the clean-checkout install and publish path are valid.

You are interacting with an AI system.

Comment thread packages/core/src/i18n/translations/en-US.json Outdated
Comment thread packages/react/src/hooks/my-organization/use-organization-details-edit.ts Outdated
@rax7389
rax7389 force-pushed the feat/3p-org-details branch from c85ca91 to 306c96a Compare August 21, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants