René's URL Explorer Experiment


Title: : SMS "Set as default" shows the raw reverification error instead of launching reverification, and has no effect while an authenticator app is enrolled · Issue #9984 · clerk/javascript · GitHub

Open Graph Title: : SMS "Set as default" shows the raw reverification error instead of launching reverification, and has no effect while an authenticator app is enrolled · Issue #9984 · clerk/javascript

X Title: : SMS "Set as default" shows the raw reverification error instead of launching reverification, and has no effect while an authenticator app is enrolled · Issue #9984 · clerk/javascript

Description: Preliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk support via email or Discord This issue ...

Open Graph Description: Preliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk ...

X Description: Preliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk ...

Opengraph URL: https://github.com/clerk/javascript/issues/9984

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\u003cUserProfile />: SMS \"Set as default\" shows the raw reverification error instead of launching reverification, and has no effect while an authenticator app is enrolled","articleBody":"### Preliminary Checks\n\n- [x] I have reviewed the documentation: https://clerk.com/docs\n- [x] I have searched for existing issues: https://github.com/clerk/javascript/issues\n- [x] I have not already reached out to Clerk support via email or Discord\n- [x] This issue is not a question, general help request, or anything other than a bug report directly related to Clerk.\n\n### Reproduction\n\nNo hosted reproduction. The behaviour is in the prebuilt `\u003cUserProfile />` and `\u003cSignIn />` components themselves, and needs no custom code. Every source line is linked below. You can reproduce it in any app that renders `\u003cUserProfile />` on an instance with **Authenticator application** and **SMS verification code** MFA enabled; the steps are at the end.\n\n### Publishable key\n\nNot provided. The problem isn't specific to our instance, and it shows up on any instance with the MFA settings above.\n\n### Description\n\nIn the MFA section of the prebuilt `\u003cUserProfile />`, the **\"Set as default\"** action on an SMS second factor behaves inconsistently. Below, we separate what **we observed at runtime** from what we **confirmed only by reading Clerk's source**. We did not create a test instance or test user to execute the source-confirmed parts.\n\n#### 1. Runtime-confirmed: \"Set as default\" doesn't launch reverification, and shows the raw error instead\n\n**Observed:** a signed-in user opens `\u003cUserProfile />` → Security and chooses **⋯ → Set as default** on an SMS MFA phone number. The card shows the raw error:\n\n> You need to provide additional verification to perform this operation.\n\nNo reverification modal opens, the action isn't retried, and the user is stuck. We saw this in production with clerk-js 5.127.2 and an unmodified `\u003cUserProfile />` (only two appearance classes passed; no custom pages or localization).\n\n**Cause (source-confirmed):** the action calls `makeDefaultSecondFactor()` directly, without `useReverification`:\n\n- [`MfaSection.tsx:175` @ clerk-js 5.127.2](https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserProfile/MfaSection.tsx#L175): `onClick: () => phone.makeDefaultSecondFactor().catch(err => handleError(err, [], card.setError))`\n- The same line is on `main`: [`packages/ui/.../MfaSection.tsx:175`](https://github.com/clerk/javascript/blob/e34a5cc2622e05eea9a683651e0784ad23705bb2/packages/ui/src/components/UserProfile/MfaSection.tsx#L175)\n\nAs far as we can tell, the other sensitive mutations in `UserProfile/` are wrapped in `useReverification`: creating phone, email, TOTP, backup codes and passkeys; changing the primary email/phone; changing the password; revoking a session; deleting the user; and the removals via `RemoveResourceForm`. So this looks like an omission.\n\n#### 2. Source-confirmed: with an authenticator app enrolled, the authenticator is always \"Default\", yet SMS rows keep offering \"Set as default\"\n\n- [`:35`](https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserProfile/MfaSection.tsx#L35): `showTOTP = secondFactors.includes('totp') && user.totpEnabled`\n- [`:72`](https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserProfile/MfaSection.tsx#L72): the authenticator-app row always renders the `badge__default` (\"Default\") badge.\n- [`:88`](https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserProfile/MfaSection.tsx#L88): `const isDefault = !showTOTP && phone.defaultSecondFactor;`. While TOTP is enrolled, no SMS row can show \"Default\", whatever its `defaultSecondFactor` value.\n- [`:172–175`](https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserProfile/MfaSection.tsx#L172-L175): \"Set as default\" is offered whenever `!isDefault`. So every SMS row keeps offering it, including after the action has succeeded.\n\n#### 3. Source-confirmed: prebuilt sign-in always starts on TOTP before phone code, so `defaultSecondFactor` doesn't make SMS the first second-factor screen\n\n- [`SignIn/utils.ts:99–115` @ 5.127.2](https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/SignIn/utils.ts#L99-L115) (`main`: [`packages/ui/.../SignIn/utils.ts:100`](https://github.com/clerk/javascript/blob/e34a5cc2622e05eea9a683651e0784ad23705bb2/packages/ui/src/components/SignIn/utils.ts#L100)): `determineStartingSignInSecondFactor` returns the `totp` factor whenever one exists, and only then falls back to `phone_code`. It doesn't consult `defaultSecondFactor`.\n- The reverification modal uses the same function ([`UserVerificationFactorTwo.tsx:49`](https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserVerification/UserVerificationFactorTwo.tsx#L49)).\n\nSo for a user with an authenticator app and a verified SMS factor, from the source: even when \"Set as default\" succeeds (`default_second_factor: true`), the badge stays on the authenticator app and sign-in still opens on the authenticator-code step. As we read it, `defaultSecondFactor` only orders phone numbers against each other, and nothing in the UI says so. The `PhoneNumber` reference describes `makeDefaultSecondFactor()` as marking the number as *the* default second factor for MFA, which suggests a stronger effect.\n\n#### 4. Questions and requests\n\n**Is this intentional?**\n\n- **If yes:** please don't show \"Set as default\" on SMS rows as if it changes the user's preferred MFA method. For example, hide it while an authenticator app is enrolled, or explain what it does.\n- **If not:**\n  1. wrap `makeDefaultSecondFactor()` in `useReverification`, so the user gets the reverification flow and the action retries;\n  2. make the displayed \"Default\" state consistent with the user's actual default second factor;\n  3. have the prebuilt `\u003cSignIn />` (and the reverification modal) honour the user's preferred/default second factor, **or** provide a supported configuration for SMS-vs-TOTP priority.\n\n#### Steps to reproduce (development instance, test user)\n\n1. Enable MFA with **Authenticator application** and **SMS verification code**; keep the default reverification window.\n2. Sign up a test user, enrol an authenticator app, then add and verify an SMS second factor.\n3. Open `\u003cUserProfile />` → Security. The authenticator app shows **Default**, and the SMS row's ⋯ menu shows **Set as default**.\n4. **Item 1:** once the session is outside the reverification window, choose ⋯ → **Set as default** on the SMS row.\n   - Expected: the reverification modal opens, and the action retries.\n   - Actual (as observed by us): the raw error above.\n5. **Items 2–3:** right after a fresh sign-in, choose ⋯ → **Set as default** on the SMS row, then sign out and back in.\n   - Expected: SMS shows **Default**, and sign-in starts with SMS; or the action isn't offered.\n   - Expected per the source (not executed by us): the request succeeds, but the badge stays on the authenticator app, the action is still offered, and sign-in starts on the authenticator-code step.\n\n### Environment\n\n```\n@clerk/clerk-js (loaded in the browser): 5.127.2   (the same code is on v5 latest and on main e34a5cc262 / packages/ui)\n@clerk/nextjs: 6.39.4\n@clerk/clerk-react: 5.61.7\n@clerk/shared: 3.47.6\nComponents: prebuilt \u003cUserProfile /> and \u003cSignIn />, no customisation beyond appearance classes\n```\n","author":{"url":"https://github.com/VIICEAI","@type":"Person","name":"VIICEAI"},"datePublished":"2026-09-29T19:22:17Z","url":"https://github.com/clerk/javascript/issues/9984"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9e97068f-9741-b217-c441-bb074db83cd1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAAF0:9D91A:756078:A61F4C:6AFB6B94
html-safe-nonce853f9033994fb86a36b30e4a231e7422cdc17c74496c673969fccff05adf6cb2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQUYwOjlEOTFBOjc1NjA3ODpBNjFGNEM6NkFGQjZCOTQiLCJ2aXNpdG9yX2lkIjoiMTM4NzExMjExMDExMzkwOTY1MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdde052d949d3e990c00bf40048ffa3ea9ed64e1ea9c4c5d07b0bb197bc18f4c0
hovercard-subject-tagissue:5635796123
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/clerk/javascript/9984/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cc1ca3f91b6847ed4dfcf8fd72383863fb33d5812aa688f6d56f0f1ae6b2daec/clerk/javascript/issues/9984
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cc1ca3f91b6847ed4dfcf8fd72383863fb33d5812aa688f6d56f0f1ae6b2daec/clerk/javascript/issues/9984
og:image:altPreliminary Checks I have reviewed the documentation: https://clerk.com/docs I have searched for existing issues: https://github.com/clerk/javascript/issues I have not already reached out to Clerk ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameVIICEAI
hostnamegithub.com
expected-hostnamegithub.com
Nonecca289ecd54650fcf3c0b037a58b97186dee2cc4406819d87fab93728fd83700
turbo-cache-controlno-preview
go-importgithub.com/clerk/javascript git https://github.com/clerk/javascript.git
octolytics-dimension-user_id49538330
octolytics-dimension-user_loginclerk
octolytics-dimension-repository_id438331492
octolytics-dimension-repository_nwoclerk/javascript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id438331492
octolytics-dimension-repository_network_root_nwoclerk/javascript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release88808b1fae5ab8a526a73e7ce5542a10eb9d6971
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/clerk/javascript/issues/9984#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fclerk%2Fjavascript%2Fissues%2F9984
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fclerk%2Fjavascript%2Fissues%2F9984
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=clerk%2Fjavascript
Reloadhttps://github.com/clerk/javascript/issues/9984
Reloadhttps://github.com/clerk/javascript/issues/9984
Reloadhttps://github.com/clerk/javascript/issues/9984
clerkhttps://github.com/clerk
javascripthttps://github.com/clerk/javascript
Codehttps://github.com/clerk/javascript
Issues45 (45)https://github.com/clerk/javascript/issues
Pull requests109 (109)https://github.com/clerk/javascript/pulls
Discussionshttps://github.com/clerk/javascript/discussions
Actionshttps://github.com/clerk/javascript/actions
Security and quality6 (6)https://github.com/clerk/javascript/security
Insightshttps://github.com/clerk/javascript/pulse
https://github.com/clerk/javascript
New issuehttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/9984
New issuehttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/9984
: SMS "Set as default" shows the raw reverification error instead of launching reverification, and has no effect while an authenticator app is enrolledhttps://github.com/clerk/javascript/issues/9984#top
Stalehttps://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3A%22Stale%22
https://github.com/VIICEAI
VIICEAIhttps://github.com/VIICEAI
on Sep 29, 2026https://github.com/clerk/javascript/issues/9984#issue-5635796123
https://clerk.com/docshttps://clerk.com/docs
https://github.com/clerk/javascript/issueshttps://github.com/clerk/javascript/issues
MfaSection.tsx:175 @ clerk-js 5.127.2https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserProfile/MfaSection.tsx#L175
packages/ui/.../MfaSection.tsx:175https://github.com/clerk/javascript/blob/e34a5cc2622e05eea9a683651e0784ad23705bb2/packages/ui/src/components/UserProfile/MfaSection.tsx#L175
:35https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserProfile/MfaSection.tsx#L35
:72https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserProfile/MfaSection.tsx#L72
:88https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserProfile/MfaSection.tsx#L88
:172–175https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserProfile/MfaSection.tsx#L172-L175
SignIn/utils.ts:99–115 @ 5.127.2https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/SignIn/utils.ts#L99-L115
packages/ui/.../SignIn/utils.ts:100https://github.com/clerk/javascript/blob/e34a5cc2622e05eea9a683651e0784ad23705bb2/packages/ui/src/components/SignIn/utils.ts#L100
UserVerificationFactorTwo.tsx:49https://github.com/clerk/javascript/blob/a5d08e04a73d80357497600517fb66819299be06/packages/clerk-js/src/ui/components/UserVerification/UserVerificationFactorTwo.tsx#L49
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Nov 3, 2026https://github.com/clerk/javascript/issues/9984#issuecomment-6591649069
GitHub Actionshttps://help.github.com/en/actions
contributing guidehttps://github.com/clerk/javascript/blob/main/docs/CONTRIBUTING.md
github-actionshttps://github.com/apps/github-actions
Stalehttps://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3A%22Stale%22
on Nov 3, 2026https://github.com/clerk/javascript/issues/9984#event-34968057786
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
on Nov 13, 2026https://github.com/clerk/javascript/issues/9984#issuecomment-6839569638
GitHub Actionshttps://help.github.com/en/actions
contributing guidehttps://github.com/clerk/javascript/blob/main/docs/CONTRIBUTING.md
github-actionshttps://github.com/apps/github-actions
not plannedhttps://github.com/clerk/javascript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Nov 13, 2026https://github.com/clerk/javascript/issues/9984#event-35976164461
Sign up for freehttps://github.com/signup?return_to=https://github.com/clerk/javascript/issues/9984
Sign in to commenthttps://github.com/login?return_to=https://github.com/clerk/javascript/issues/9984
Stalehttps://github.com/clerk/javascript/issues?q=state%3Aopen%20label%3A%22Stale%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.