Skip to content

refactor(mosaic): use the shared enterprise check for adding passkeys, emails and phone numbers - #10473

Open
alexcarpenter wants to merge 3 commits into
mainfrom
carp/mosaic-passkeys-shared-enterprise-check
Open

alexcarpenter wants to merge 3 commits into
mainfrom
carp/mosaic-passkeys-shared-enterprise-check

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Description

The passkeys, email and phone sections each decided whether the user may add an identification with their own copy of the enterprise SSO check. They now call the shared allowsIdentificationCreation helper, as connected accounts and web3 wallets already do, and the local canAddIdentifications copy in the contact utils is removed. Behavior is unchanged.

The helper's test now also covers an active enterprise connection that permits additional identifications. Before, the helper could ignore the connection's disableAdditionalIdentifications flag and every test still passed.

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

vercel Bot commented Oct 27, 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 Oct 28, 2026 12:25am UTC
swingset Ready Ready Preview Oct 28, 2026 12:25am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 95d9d49

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
Commits

Reviewing files that changed from the base of the PR and between d2bb18d and 95d9d49.

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

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between fb39714 and d2bb18d.

Files selected for processing: 3
  • packages/mosaic/src/features/user-profile/user-profile-contact.utils.ts
  • packages/mosaic/src/features/user-profile/user-profile-email-section/user-profile-email-section.model.ts
  • packages/mosaic/src/features/user-profile/user-profile-phone-section/user-profile-phone-section.model.ts
Linked repositories identified

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

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.

Walkthrough

The passkey, email, and phone models now use allowsIdentificationCreation with the user and full enterprise SSO configuration. The previous canAddIdentifications utility is removed. A test covers an active enterprise connection that permits additional identifications. A changeset file gains empty YAML frontmatter delimiters.

Priority: Normal

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

Possibly related PRs

  • clerk/javascript#10366: Applies allowsIdentificationCreation to Web3 wallet creation and verification. This PR applies the same utility to passkey, email, and phone creation.
Merge Risk: Minimal · previous review d2bb1

No concrete current-head defect or release workflow failure is supported; the refactor preserves the existing identification-creation behavior.

Pre-merge checks: Passed 4 · Failed 1

Failed 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%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within survi… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the main change: the passkeys, email, and phone sections switch to the shared enterprise check. It also notes the removal of the duplicate logic in the contact utils, which the summary…
Description check Passed The description states that the passkeys, email, and phone sections now call the shared allowsIdentificationCreation helper and that the local canAddIdentifications copy is removed. It also explains t…
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: the passkeys, email, and phone sections switch to the shared enterprise check. It also notes the removal of the duplicate logic in the contact utils, which the summary confirms. The title is specific and matches the changeset.

Full details: Description check

Explanation

The description states that the passkeys, email, and phone sections now call the shared allowsIdentificationCreation helper and that the local canAddIdentifications copy is removed. It also explains the added test case for an active enterprise connection. This matches the changeset.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 5 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
  • 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.

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-native-components

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 95d9d49

@alexcarpenter alexcarpenter changed the title refactor(mosaic): use the shared enterprise check for adding passkeys refactor(mosaic): use the shared enterprise check for adding passkeys, emails and phone numbers Oct 27, 2026

This branch was successfully deployed

2 active deployments
Preview – swingset — 95d9d493 Deployed Oct 28, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 95d9d493 Deployed Oct 28, 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.

1 participant