Skip to content

fix(login): register with email only in the bundled view#105

Merged
Bccorb merged 1 commit into
mainfrom
fix/email-only-registration
Jul 20, 2026
Merged

fix(login): register with email only in the bundled view#105
Bccorb merged 1 commit into
mainfrom
fix/email-only-registration

Conversation

@Bccorb

@Bccorb Bccorb commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

What

The bundled registration screen (AuthRoutes -> Login in register mode) now collects only an email. It previously required a phone number too.

Why

Registration only needs an email. I confirmed against the API: RegistrationRequestSchema is email: z.email() with phone: z.string().nullish(), and the controller treats an empty or missing phone as "not provided". So the phone field in the bundled view asked for data the flow does not need, and made email-only sign-up impossible through AuthRoutes. Phone can be added and verified later through the existing phone flow.

Changes

  • src/views/Login.tsx: remove the phone input from register mode, along with the phone / phoneError state and the phoneInput import. canSubmit for registration is now just a valid email, and register() no longer passes a phone. Login mode is untouched (its identifier still accepts an email or a phone, so isValidPhoneNumber stays).
  • src/client/createSeamlessAuthClient.ts: RegisterInput.phone is now optional (phone?: string | null) and only sent when provided, mirroring bootstrapToken. This is a widening, so existing callers passing a phone still compile, and headless consumers can still submit one.

Tests

The register test is rewritten to submit with an email only. It asserts there is no phone field rendered, and that register is called without a phone property. The unused phoneInput test mock is removed.

Full suite: 223 passed.

Out of scope, flagging

npm run format:check reports two files that are already unformatted on main and unrelated to this change: .changeset/dts-relative-paths.md and tsconfig.build.json. They appear to have merged without passing the formatter (same class as the earlier OAuthCallback formatting drift). Not touched here to keep this diff focused. Worth a one-line prettier --write follow-up.

Checks

  • npm run typecheck, npm run lint clean
  • npm run format:check clean for the files this PR touches
  • Full suite: 223 passed
  • Changeset (patch)

@Bccorb
Bccorb merged commit 597f6d2 into main Jul 20, 2026
2 of 3 checks passed
@Bccorb
Bccorb deleted the fix/email-only-registration branch July 20, 2026 23:58
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.

1 participant