Launch offer for the first 500 accounts: $10K MTR free for 24 months + $100 credit →
    .io

    Passwordless — Email & SMS Codes

    Two calls, one flow

    requestCode sends a code; attempt with email_code or sms_code spends it. The channel was already decided by the identifier's kind when the code was requested — the two strategies verify identically.

    The flow

    await auth.requestCode({ identifier: 'ada@example.com' });
    // -> { sent: true, expiresInMinutes: 10 }
    
    const { session } = await auth.attempt({
      identifier: 'ada@example.com',
      strategy: 'email_code',
      code: '123456',
    });

    What the response does and does not tell you

    { sent: true } means the request was accepted. It does not mean an account exists, and it does not mean the message was delivered. Both are indistinguishable on purpose: an endpoint that answered differently for a registered address would be a free account-enumeration tool.

    Codes live ten minutes, are single-use, and are rate-limited to three requests per identifier per ten seconds. That limit also bounds what an attacker can spend of your SMS budget.

    Purposes

    PurposeForCan complete a sign-in
    sign_inDefault. Signing an existing user inYes
    verify_identifierProving a newly added address or numberYes
    reset_passwordPassword reset onlyNo — refused by attempt

    SMS: two settings that will surprise you

    The same card holds a monthly message cap, defaulting to 500 per project. It is a spend control: once reached, sends stop until the month rolls over. Raise it deliberately rather than discovering it during a launch.

    Delivery

    Auth mail is sent through your own provider, configured in project settings — BillDog will not fall back to sending as billdog.io, because a sign-in code arriving from an unfamiliar domain is both a support burden and a phishing lesson you do not want to teach your users. Configure a provider before enabling passwordless.

    Next

    Was this page helpful?

    Or rate this page:

    We use cookies and process your data to provide our services. By continuing, you agree to our Terms and Privacy Policy.