feat: add sso third party access section shared component - #470
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdded 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. ChangesSSO provider third-party access
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
@coderabbitai review |
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
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 winMake the custom-message test verify translation overrides.
The
useTranslatormock discards its arguments. The test at Lines 159-169 therefore succeeds even if the component stops passingcustomMessagestouseTranslator.Make the mock retain the override argument, then assert that
t('title')rendersCustom Titleor assert thatuseTranslatorreceived 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
📒 Files selected for processing (5)
packages/core/src/i18n/custom-messages/my-organization/idp-management/sso-provider/sso-provider-create-types.tspackages/core/src/i18n/custom-messages/my-organization/idp-management/sso-provider/sso-provider-edit-types.tspackages/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-shared/__tests__/sso-third-party-access-section.test.tsxpackages/react/src/components/auth0/my-organization/shared/idp-management/sso-provider-shared/sso-third-party-access-section.tsxpackages/react/src/tests/utils/__mocks__/my-organization/idp-management/sso-provider-edit/third-party-access-section.mocks.ts
The merge-base changed after approval.
Summary
Add reusable
SsoThirdPartyAccessSectioncomponent 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
SsoThirdPartyAccessSectioncomponent with checkbox controlshowThirdPartyAccessis true from configPackages
packages/corepackages/reactexamplesTesting
Checklist
Contributing
Summary by CodeRabbit
New Features
Tests