Skip to content

feat: add sso third party access section shared component - #470

Open
rax7389 wants to merge 7 commits into
feat/3p-org-detailsfrom
feat/3p-third-party-section
Open

feat: add sso third party access section shared component#470
rax7389 wants to merge 7 commits into
feat/3p-org-detailsfrom
feat/3p-third-party-section

Conversation

@rax7389

@rax7389 rax7389 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Add reusable SsoThirdPartyAccessSection component for IdP Create/Edit screens, allowing providers to be enabled for third-party application access.

Why

The third-party access checkbox needs to be available in both SSO Provider Create and Edit flows. This shared component ensures consistent UI and behavior. Part 2 of the 3P Client Access feature (UIC-1380).

What

  • Add SsoThirdPartyAccessSection component with checkbox control
  • Add i18n translations for third party access messages
  • Add test coverage and mock utilities
  • Component shows when showThirdPartyAccess is true from config

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 a third-party access option to SSO provider configuration and details.
    • Added a clearly labeled checkbox with supporting guidance and separator styling.
    • Added read-only behavior for configurations that cannot be edited.
    • Added accessibility support, including descriptive labels and helper text.
    • Added support for localized and customized messages.
  • Tests

    • Added coverage for rendering, interactions, read-only behavior, accessibility, custom messages, and styling.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: de32d2df-c80a-45e2-92bb-8dc51084369f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added third-party access message contracts for SSO providers and a React section with controlled checkbox behavior, translations, accessibility attributes, read-only support, custom styling, and tests.

Changes

SSO provider third-party access

Layer / File(s) Summary
Third-party access message contracts
packages/core/src/i18n/custom-messages/my-organization/idp-management/sso-provider/sso-provider-edit-types.ts, packages/core/src/i18n/custom-messages/my-organization/idp-management/sso-provider/sso-provider-create-types.ts
Added message interfaces for third-party and cross-application access. Added optional third-party access messages to provider configuration and SSO provider details.
Third-party access section
packages/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-shared/sso-third-party-access-section.tsx
Added a translated checkbox section with controlled state, read-only handling, accessibility identifiers, custom messages, and custom class names.
Section fixtures and validation
packages/react/src/tests/utils/__mocks__/my-organization/idp-management/sso-provider-edit/third-party-access-section.mocks.ts, packages/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-shared/__tests__/sso-third-party-access-section.test.tsx
Added reusable mocks and tests for rendering, state changes, accessibility, custom messages, styling, and structure.

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

Possibly related PRs

Suggested labels: enhancement

Suggested reviewers: grandmaester

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: adding a reusable SSO third-party access section component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/3p-third-party-section

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.

@rax7389

rax7389 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@rax7389

rax7389 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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: 1

🧹 Nitpick comments (1)
packages/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-shared/__tests__/sso-third-party-access-section.test.tsx (1)

13-15: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Make the custom-message test verify translation overrides.

The useTranslator mock discards its arguments. The test at Lines 159-169 therefore succeeds even if the component stops passing customMessages to useTranslator.

Make the mock retain the override argument, then assert that t('title') renders Custom Title or assert that useTranslator received the expected namespace and override object.

Also applies to: 159-169

🤖 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/components/auth0/my-organization/shared/idp-management/sso-provider-shared/__tests__/sso-third-party-access-section.test.tsx`
around lines 13 - 15, Update the useTranslator mock and the custom-message test
around the relevant test case so the mock captures the namespace and
customMessages arguments instead of discarding them. Assert that the component
passes the expected namespace and override object, or verify that t('title')
renders “Custom Title,” ensuring the test fails when customMessages is no longer
forwarded.
🤖 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/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-shared/sso-third-party-access-section.tsx`:
- Around line 26-34: Update the component using the useTranslator flow to import
and call useId from the use-id-compat utility instead of React.useId(), and
change its return type from React.JSX.Element to React.ReactElement to preserve
compatibility with the declared React 16.11 and React 17 peer versions.

---

Nitpick comments:
In
`@packages/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-shared/__tests__/sso-third-party-access-section.test.tsx`:
- Around line 13-15: Update the useTranslator mock and the custom-message test
around the relevant test case so the mock captures the namespace and
customMessages arguments instead of discarding them. Assert that the component
passes the expected namespace and override object, or verify that t('title')
renders “Custom Title,” ensuring the test fails when customMessages is no longer
forwarded.
🪄 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: 1f4dfae1-cc04-44bd-ab27-8bd00e1ab108

📥 Commits

Reviewing files that changed from the base of the PR and between 0b308b0 and 89126c9.

📒 Files selected for processing (5)
  • packages/core/src/i18n/custom-messages/my-organization/idp-management/sso-provider/sso-provider-create-types.ts
  • packages/core/src/i18n/custom-messages/my-organization/idp-management/sso-provider/sso-provider-edit-types.ts
  • packages/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-shared/__tests__/sso-third-party-access-section.test.tsx
  • packages/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-shared/sso-third-party-access-section.tsx
  • packages/react/src/tests/utils/__mocks__/my-organization/idp-management/sso-provider-edit/third-party-access-section.mocks.ts

grandmaester
grandmaester previously approved these changes Aug 19, 2026

@grandmaester grandmaester 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.

LGTM!!

@rax7389
rax7389 dismissed grandmaester’s stale review August 21, 2026 08:00

The merge-base changed after approval.

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