FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Dropping Email Required — Migrating to Phone OR Email Authentication
How-ToWeb Development

Dropping Email Required — Migrating to Phone OR Email Authentication

via Dev.to Reactlinou5182h ago

Background While building an internal e-commerce site, I put an email required constraint on the registration form from day one. The reason was simple: authentication = email was my unconscious assumption. Then reality hit. Most existing users only had phone numbers. Specifically, users registered via LINE only had phone numbers in the database — no email addresses. When they tried to register, they got a Bad Request error. The Problem Structure The frontend (React) sends phone number + password. The backend (Node.js/TypeScript) looks up users by phone number, but users with email as required field = unset were not processed correctly. Worse, when a phone number was submitted for new registration but already existed in the DB, it tried to create a new record and hit a Unique constraint violation. Two problems: Registration: email as required field causes validation to reject phone-only users Registration: attempting to create a new user with an existing phone number causes Unique error

Continue reading on Dev.to React

Opens in a new tab

Read Full Article
0 views

Related Articles

5 Things I Learned After 3 Years as a Software Engineer
How-To

5 Things I Learned After 3 Years as a Software Engineer

Medium Programming • 11m ago

I Thought Learning to Code Would Change My Life. I Was Right — But Not in the Way I Expected
How-To

I Thought Learning to Code Would Change My Life. I Was Right — But Not in the Way I Expected

Medium Programming • 1h ago

How-To

Why Programming Paradigms Matter in Modern Software Development?

Medium Programming • 2h ago

How to clear your Roku TV cache (and why it's critical to do so)
How-To

How to clear your Roku TV cache (and why it's critical to do so)

ZDNet • 2h ago

Introducing KodeSherpa: Build DeFi Smart Contracts with Ease
How-To

Introducing KodeSherpa: Build DeFi Smart Contracts with Ease

Dev.to • 3h ago

Discover More Articles