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
How We Let Users Register with Just a Phone Number on a NOT NULL Email Column
NewsWeb Development

How We Let Users Register with Just a Phone Number on a NOT NULL Email Column

via Dev.tolinou51811h ago

How We Let Users Register with Just a Phone Number on a NOT NULL Email Column When we bolted a shop frontend onto an existing ERP system, we hit a quiet but annoying authentication problem. The user table's email column was NOT NULL + UNIQUE . The ERP managed accounts by email. But the shop's target users were wholesale buyers—people who live on their phones and LINE. Many don't have an email address, or at least don't want to type one into a registration form. The solution: placeholder emails . System Architecture ERP Backend (Node.js + TypeScript) └─ User model: email (unique, not null), phone, name, role └─ /api/shop/auth/register ← called by Shop └─ /api/shop/auth/login Shop Frontend (React + TypeScript) └─ Register.tsx: phone + name + password (email optional) └─ Login.tsx: phone + password The shop and ERP share the same User table. ERP users have role: 'staff' or 'admin' ; shop customers get role: 'customer' . Backend: Sneaking Past the Constraint with Placeholder Emails The cor

Continue reading on Dev.to

Opens in a new tab

Read Full Article
3 views

Related Articles

Rivian’s RJ Scaringe thinks we’re doing robots all wrong
News

Rivian’s RJ Scaringe thinks we’re doing robots all wrong

TechCrunch • 8h ago

News

Separating the Wayland Compositor and Window Manager

Lobsters • 9h ago

5. Dining Savage Problem
News

5. Dining Savage Problem

Medium Programming • 9h ago

Stop Prompting, Start Teaching — Claude Skill คืออะไร และผมใช้มันยังไงที่ Bitkub
News

Stop Prompting, Start Teaching — Claude Skill คืออะไร และผมใช้มันยังไงที่ Bitkub

Medium Programming • 9h ago

Threads & Handlers in Android: Running Background Tasks Safely with AsyncTask
News

Threads & Handlers in Android: Running Background Tasks Safely with AsyncTask

Medium Programming • 9h ago

Discover More Articles