टू-फैक्टर ऑथेंटिकेशन

दो कॉल में एक दूसरा फैक्टर जोड़ें।

इसमें सेट अप करें:
Cursor

Two-factor authentication adds a second proof on top of a password: a one-time code on a channel the user controls. With Bird Verify it's a send call at the moment of login and a check call when the user types the code back: SMS, WhatsApp, or email today, per-country channel config, and nothing to store between the two.

verify.ts
200 · pending
import { BirdClient } from "@messagebird/sdk";

const bird = new BirdClient({
  apiKey: process.env.BIRD_API_KEY!,
});

// Send the code, then check it by recipient.
await bird.verify.verifications.create({
  to: { phone_number: "+15551234567" },
}).safe();

const { data, error } = await bird.verify.verifications.check({
  to:   { phone_number: "+15551234567" },
  code: userInput,
}).safe();
if (error) throw error;

2FA वही verification फ़्लो है, जो लॉगिन की ओर इशारा करता है।

Under the hood, 2FA is the same flow the Bird Verify API runs everywhere: create a verification for the user's phone or email when they sign in, then check the code they enter. Because the check is by recipient, your login handler keeps no per-attempt state, and the workspace's routing decides which channel a given user gets. Drop the password in front of it and the same flow becomes passwordless login.

2FA के लिए आप क्या वायर करते हैं।

दो कॉल और एक कॉन्फ़िगरेशन।

  1. 01

    लॉगिन पर भेजें, सबमिट पर check करें।

    जब यूज़र अपने पहले फैक्टर से ऑथेंटिकेट करे तो एक verification बनाएं; जब वे कोड डालें तो उसे check करें। यही पूरा इंटीग्रेशन है।

  2. 02

    फैक्टर के रूप में SMS, WhatsApp, या email।

    यूज़र के लिए जो चैनल आपके पास पहले से है उसका इस्तेमाल करें: SMS या WhatsApp पर एक फ़ोन नंबर, email पर एक email। और विकल्पों के लिए Voice रोल आउट हो रहा है।

  3. 03

    One configuration, workspace-wide.

    Routing, code rules, and channel plan live in a single configuration for the whole workspace, already covering login, signup, and high-value actions.

  4. 04

    ब्रूट फ़ोर्स सीमित है।

    प्रयास लॉकआउट और प्रति-recipient send कैप बिल्ट-इन आते हैं, ताकि एक दूसरा फैक्टर नया अटैक सरफेस न बन जाए।

लॉगिन-टाइम फ़्लो।

पासवर्ड सही निकलते ही कोड भेजें; जब यूज़र सबमिट करे तो उसे वेरिफ़ाई करें। गलत कोड एक ऐसा रिज़ल्ट है जिस पर आप ब्रांच करते हैं, कोई एक्सेप्शन नहीं जिसे कैच करना पड़े।

two-factor.ts
200
// Send the second factor once the password checks out.
await bird.verify.verifications.create({
  to: { phone_number: user.phone },
}).safe();

const { data, error } = await bird.verify.verifications.check({
  to:   { phone_number: user.phone },
  code: submitted,
}).safe();
if (error) throw error;

if (data.success) grantSession(user);

टू-फैक्टर ऑथेंटिकेशन, आपके बाकी चैनलों वाले उसी API पर।

Bird Verify is the code-based factor for your login and signup: SMS, email, and WhatsApp now, voice rolling out.

एक चैनल से शुरुआत करें।
तैयार होने पर बाकी जोड़ें।

एक test API key तुरंत आपकी है। जब आप payment method जोड़ते हैं और sender verify करते हैं, तब production अनलॉक हो जाता है।

Claude Code, Cursor या Codex इस्तेमाल कर रहे हैं? एक setup prompt कॉपी करें और आपका agent आपके लिए Bird CLI और skills इंस्टॉल कर देगा। अपना चुनें:

Cursor