newOS for Developers

Back to Overview

PhoneSignIn

inputPlayground

Phone number authentication form with OTP verification flow.

Source Path
apps/web/Components/Forms/PhoneSignIn.tsx

Authentication Flow

  1. User enters phone number with country code selector
  2. Request OTP via Firebase Phone Auth
  3. User enters 6-digit verification code
  4. Verify OTP and obtain Firebase ID token
  5. Exchange for Newgraph JWT via auth API
  6. Store token and redirect to app

API Integration

firebase.auth().signInWithPhoneNumber()
confirmationResult.confirm(code)
newgraph-signals/auth.ts — Token exchange

Related Components