Repository navigation
Add a phone code (text or voice call) as an MFA factor - #61
Merged
Merged
Conversation
pacific-ring
force-pushed
the
feature/mfa-public-api
branch
from
November 5, 2026 11:15
9fb6fcf to
292091b
Compare
NandanPrabhu
reviewed
Nov 5, 2026
The server's MFA menu can offer a code sent to a phone. MFA now runs it next to push:
- one factor per way a phone can be reached, each its own row in the list ("SMS OTP" / "Voice OTP")
- a code screen ("Enter the 6-digit code") with an inline wrong-code line, Resend after 60 seconds and Verify another way
- phone rules live in MfaReducer; the engine sends and verifies the code
- public MfaFactorId.Phone, PhoneChallengeModel, PhoneDelivery, MfaScreens.phoneChallenge and
MfaMessages.phoneChallenge, so the screen can be reworded, replaced or drawn headless
Two fixes found on the way, both in screens the first factor shares:
- OTPInputField keeps its cursor after the last digit; after a rotation it started at the front and Backspace did nothing
- a dismissed wrong-code line no longer comes back after a rotation (MFA phone screen and LoginCodeScreen)
EXAMPLES.md: the embedded login section is shorter and follows the iOS guide's shape.
Co-Authored-By: Claude <noreply@anthropic.com>
- Code screen: "We’ve sent a code to *********0128" (voice: "We’re calling …") and a "One-Time Passcode" label above the boxes - A number the server hid completely is not named: "We’ve sent a code to your phone" - List tiles: "SMS OTP" / "Voice OTP" with the masked number on a second line, like the device name under a push tile; Voice uses a handset icon (Lucide phone, the same set as the SMS icon) - Hidden digits are one character (`*`): anything the server uses to hide a digit is shown as the same `*` - Inter's contextual alternates swapped the five characters nearest the digits for a raised, larger form, so the number showed two sizes; they are turned off for the lines that show a number (FlowScreenHeader gets an optional subtitleFontFeatures) - OTPInputField remembers its TextFieldValue instead of building one on every recomposition - Docs for rowText/rowVoice say what the default words do Co-Authored-By: Claude <noreply@anthropic.com>
pacific-ring
force-pushed
the
feature/mfa-sms-otp
branch
from
November 5, 2026 18:02
1fe0562 to
9296fc5
Compare
…quest neutrally - A push comes before a code sent to a phone (the more phishing-resistant first); within each kind the server's order is kept - The "request expired" message no longer says it "wasn't approved in time", which made no sense for an expired phone code Co-Authored-By: Claude <noreply@anthropic.com>
5 of 13 tasks
A phone code waiting behind an in-flight push check was not tracked, so if the check ended the round the code still went out for a screen the user never sees. It is now tracked like the push send and cancelled with the other challenge work (CancelPushWork is renamed CancelChallengeWork to match). Also correct the Back description in EXAMPLES.md: from a factor screen Back goes to the list in later rounds even with a single factor. Co-Authored-By: Claude <noreply@anthropic.com>
Contributor
Author
MFA_SMS_OTP.mp4 |
Co-Authored-By: Claude <noreply@anthropic.com>
NandanPrabhu
previously approved these changes
Nov 6, 2026
NandanPrabhu
reviewed
Nov 6, 2026
pmathew92
reviewed
Nov 6, 2026
pmathew92
reviewed
Nov 6, 2026
pmathew92
reviewed
Nov 6, 2026
pmathew92
previously approved these changes
Nov 6, 2026
…e MFA code field A send queued behind a push check got its turn from the SDK lock before the check's answer reached the engine, so cancelling it on a new round came too late and a text or call went out for a screen the user never sees. Sends now wait for the check to be answered and applied first, so the new round can drop them. The push and phone sends share one job instead of one per factor, since only one send is ever out at a time. The code field on the MFA code screen gets a content description for TalkBack, and the EXAMPLES.md note on Back and the capabilities KDoc are corrected. Co-Authored-By: Claude <noreply@anthropic.com>
pacific-ring
dismissed stale reviews from pmathew92 and NandanPrabhu
via
November 6, 2026 10:05
9e66a48
NandanPrabhu
approved these changes
Nov 6, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a code sent to a phone (text message or voice call) as an MFA factor, next to push.
MfaReducerholds the phone rules and the engine sends and verifies the code.CHALLENGE_PHONEis added to the capabilities. "One more step" rounds work as for push.MfaFactorId.Phone,PhoneChallengeModel,PhoneDelivery,MfaScreens { phoneChallenge { } },MfaMessages { phoneChallenge { } }, and the headless step.OTPInputField(cursor stays after the last digit) andFlowScreenHeader(optionalsubtitleFontFeatures, off by default).EXAMPLES.mdupdated.Type of Change
References
Testing
Test Configuration:
Screenshots (if appropriate)
Checklist
I have read the Auth0 general contribution guidelines
I have read the Auth0 Code of Conduct
All existing and new tests complete without errors
🤖 Generated with Claude Code