<SignIn />: first "Use email" click switches back to phone when `initialValues.phoneNumber` is set
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react, typescript
調査の方向性
まず packages/ui/src/components/SignIn/SignInStart.tsx を確認し、特に textIdentifierField の初期化と issue で説明されている自動入力の effect を調べてください。「メールを使用」をクリックしたときに handlePhoneNumberPaste とどう連携するかを追跡してください。再現リンクを使って動作を確認できます。最初のクリックで電話番号が事前入力されたメールフィールドが表示され、このケースを回帰テストでカバーできたら完了です。
索引モデルが issue の本文から書いたものです。
説明
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 (if you have, no need to open an issue here)
- This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
https://github.com/twicestruck/clerk-signin-phone-prefill-repro
Publishable key
pk_test_ZXhwZXJ0LXVuaWNvcm4tNzgyOC5jbGVyay5hY2NvdW50cy5kZXYk
Description
With email and phone both enabled as sign-in identifiers, <SignIn initialValues={{ phoneNumber: '+15555550100' }} /> opens on the phone field as expected, but the first "Use email" click switches straight back to the phone field. The second click works.
Steps to reproduce:
- Run the reproduction with the publishable key above
- Click "Use email" once
Expected behavior:
The email field shows.
Actual behavior:
The form switches back to the phone field.
Cause: when the form starts on the phone field, SignInStart seeds textIdentifierField with initialValues[identifierAttribute], which is the phone number (source). After the switch, the autofill effect sees a value starting with + and calls handlePhoneNumberPaste, which switches back to the phone field and clears the email field, so the second click sticks. A prefilled number without + shows up in the email field instead.
I'll open a PR with a fix and a test.
Environment
System:
OS: macOS 27.0.1
CPU: (18) arm64 Apple M5 Max
Memory: 157.16 MB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.22.0
npm: 11.19.1
pnpm: 12.14.0
bun: 1.4.3
Browsers:
Brave Browser: 155.1.97.59
Chrome: 155.0.8059.85
Chrome Canary: 158.0.8110.0
Firefox: 158.0
Safari: 27.0.1
npmPackages:
@clerk/react: 6.18.3 => 6.18.3
@vitejs/plugin-react: 6.1.2 => 6.1.2
react: 19.3.1 => 19.3.1
react-dom: 19.3.1 => 19.3.1
vite: 8.3.5 => 8.3.5
- 主要言語
- TypeScript
- スター
- 1.8k
- フォーク
- 484
- 平均マージ
- 1日 20時間
- マージ済み PR(30日)
- 363
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
clerk/javascript のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
clerk/javascript#10548 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
clerk/javascript#10547 ·
メンテナーはふだん 1 日以内に返信
-
useLoadedIsomorphicClerk misses "ready" when a ClerkProvider remounts after clerk-js has loaded — <ClerkLoading> never resolves再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
clerk/javascript#10462 ·
メンテナーはふだん 1 日以内に返信
-
ClerkAPIError drops meta.lockout_expires_in_seconds from user_locked errors対応中かも @umeraamir69 が 10 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
clerk/javascript#10026 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
@clerk/nextjs: onBeforeSetActive never settles when invalidateCacheAction rejects (e.g. after a redeploy), so setActive and signOut hang forever対応中かも @RaphaelFakhri が 26 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
clerk/javascript#9987 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
clerk/javascript の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
Doist/todoist-sdk-typescript#740 ·
メンテナーはふだん 1 日以内に返信
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:auth-provider issue-rating: 🦞 diamond lobster no-stale P1
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
steipete/oracle#614 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
MoonshotAI/kimi-code#4591 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
Koenkk/zigbee-herdsman-converters#13656 ·
メンテナーはふだん 2 日以内に返信
-
check:passed streams:remove
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信