Skip to content

Setup OTP

Firebase Setup

To use OTP with Firebase as your provider, follow these steps:

  1. Go to your firebase console.
  2. Go to the Authentication section.
  3. Enable the Phone Number authentication.

Supabase Setup

To use Supabase as your provider, follow these steps:

  1. Go to the supabase dashboard of your project.
  2. Go to the Authentication section.
  3. Click on the providers options.
  4. Enable the Phone Number authentication.
  5. Use whichever SMS provider you want to use for OTP (Twilio, MessageBird, etc.).
  6. We recommend using Twilio Verify.
  7. Add the TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN and TWILIO_VERIFY_SERVICE_SID provided by the SMS provider to the options provided in the dashboard.

Express-app Setup

To use a custom REST API as your provider, follow these steps:

  1. Go to the Twilio Verify dashboard.
  2. Create a new service, and get the credentials i.e. ACCOUNT_SID, AUTH_TOKEN and VERIFY_SERVICE_SID.
  3. Place these credentials in the env file at backend/express-js/.env, following the format specified for REST API.

After setting up the OTP, you can use the sendOTP function to send OTP to the user’s phone number. OTP service should now be setup for your app for all providers.