How do I let users sign in with their phone number?

Forte's built-in user authentication treats a phone number as a first-class sign-in channel, alongside email and Google.

How it works

Your users add a phone number as a contact method and verify it with a one-time passcode. Once it's verified, they can sign in with an SMS one-time code — no password — using the same forte.users.* client-side API you use for email sign-in. The code is texted from your own branded sender.

What you do

  1. Make sure SMS sign-in is enabled for your project in the console.
  2. From your frontend, start an OTP login for the phone number; Forte sends the code.
  3. Complete the login with the code the user enters — Forte sets the session cookie automatically.

Phone numbers also work as a second factor if you turn on MFA with SMS one-time passcodes. See Authentication for the full sign-in flow and Sessions for how sessions are issued.

Related questions

Still need help?

If this didn't answer your question, our team is one message away.

Contact support