Repository navigation
fix(ui): submit one verification code at a time - #11048
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
🦋 Changeset detectedLatest commit: cb1f580 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |


Description
With an external keyboard connected to an iPhone, SMS code autofill can change the OTP input's value several times.
useFieldOTPsubmitted every 6-digit value it saw, so several wrong codes went out at once and users got locked out with "Too many failed attempts".A code completed while another is being verified is now queued instead of submitted. It is submitted only if the in-flight one fails and the queued code is different.
What we know about the iOS side, from a device trace captured with the probe page linked in the comments:
iOS delivers the autofilled code as fake key presses. For the code
795598it sent7 ⌫ 7 9 9 5 5 5 5 9 9 8 8 ⏎: each digit twice, plus a stray backspace.Once the field is full, input-otp selects the last box, so each extra key press overwrites the last digit. The value went
799555→799559→799558, which made 3 submits before this change.A plain
<input maxlength=6 autocomplete=one-time-code>gets the same pattern (6 ⌫ 6 55 11 66 66 22) and ends with a wrong code too, so this is an iOS bug, not input-otp. Reported to Apple as FB25796827.This change limits the damage but does not make autofill work in this case. None of those values is the real code, so the user still sees at most 2 failed attempts and has to type the code by hand.
Raises the
ui-commonbundlewatch limit from 142KB to 144KB: the change put it at 142.02KB, andbundlewatch:fixrounds up.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change