Skip to content

Sign in with a phone number (SMS code) as a first factor - #62

Merged
pacific-ring merged 2 commits into
mainfrom
feature/phone-first-factor
Nov 6, 2026
Merged

pacific-ring merged 2 commits into
mainfrom
feature/phone-first-factor

Conversation

@pacific-ring

@pacific-ring pacific-ring commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adding Support for Phone as an Option for first factor in embedded login

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvement

Testing

  • Unit tests (added to EmbeddedLoginRepositoryImplTest)
  • Manual testing
  • Sample app testing

Screenshots (if appropriate)

Phone_First_factor.mp4

Checklist

@pacific-ring
pacific-ring requested a review from a team as a code owner November 5, 2026 23:10
NandanPrabhu
NandanPrabhu previously approved these changes Nov 6, 2026
Comment thread EXAMPLES.md Resolved
pmathew92
pmathew92 previously approved these changes Nov 6, 2026
@pacific-ring
pacific-ring force-pushed the feature/phone-first-factor branch from 2ab5e23 to 9920932 Compare November 6, 2026 10:25
@pacific-ring
pacific-ring changed the base branch from feature/mfa-sms-otp to main November 6, 2026 10:33
@pacific-ring
pacific-ring dismissed stale reviews from pmathew92 and NandanPrabhu November 6, 2026 10:33

The base branch was changed.

pacific-ring and others added 2 commits November 6, 2026 16:10
Email stays the first screen, as in the Figma. When the tenant also offers
a phone, the email screen shows "OR" and "Continue with Phone", which opens
a phone entry (country picker + number). Back goes code -> phone -> email.

- LoginOption.PhoneOtp; IdentifyPhone and a texted/called VerifyOtp map to it
- Repository.startOtp(method, identifier) replaces startEmailOtp; a phone is
  texted, or called when that is all the server offers for it
- IDENTIFY_PHONE is now told to the server
- State carries the method so Edit, Try again, Resend and MFA "Start over"
  return to the right screen; a submit from a screen that was just replaced
  and a switch while a code is being sent are dropped
- CodeNotSent names the method; wrong-code text says phone
- A phone or email the server refuses shows a full-screen "Invalid ... format"
  error (InvalidIdentifier); Try again keeps what was typed
- Phone number is one E.164 string, at most 15 digits with the country code;
  the country starts as the United States, as in the design
- Email and phone entry slide between each other (own transition key)
- Country picker lists countries A to Z by name

Co-Authored-By: Claude <noreply@anthropic.com>
…e device's

- Keep the country picked for a phone number, so Edit and Try again show it again
- Start the phone field on the device's country, falling back to the United States
- Keep the server's rejection as the cause of an invalid identifier
- Default the input field's leading content to an empty lambda
- Correct the Back behaviour described for phone entry in EXAMPLES.md

Co-Authored-By: Claude <noreply@anthropic.com>
@pacific-ring
pacific-ring force-pushed the feature/phone-first-factor branch from 9920932 to 3d329ae Compare November 6, 2026 10:42
@pacific-ring
pacific-ring merged commit 32c7f9f into main Nov 6, 2026
5 checks passed
@pmathew92 pmathew92 mentioned this pull request Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants