Skip to main content

SMS Passwordless Login with Web3Auth

Create a SMS Passwordless verifier

  • Go to the Web3Auth dashboard and select your project. Click on the Custom Authentication tab, then click on the Create Verifier button to create a new verifier.

    Custom Authentication Dashboard

  1. Give a unique name to your verifier in the Verifier Identifier field. e.g., sms-passwordless-verifier.

  2. From the list of Login Providers, select Social Login Providers and Select SMS Passwordless from the dropdown list.

Login Providers list on Web3Auth Dashboard

  1. Finally, click on the Create button to create the SMS Passwordless verifier.

SMS Passwordless Verifier on Web3Auth Dashboard

It typically takes 5-10 minutes for the verifier to go live. Once deployed & live, you'll receive an email and the dashboard will display the 'Live' status for the verifier.

Example

import { AuthAdapter } from "@web3auth/auth-adapter";

// Create AuthAdapter instance once you have created Web3Auth instance
const authAdapter = new AuthAdapter({
adapterSettings: {
loginConfig: {
// SMS Passwordless login
sms_passwordless: {
verifier: "w3a-sms-passwordless-demo", // Pass your verifier name here
typeOfLogin: "sms_passwordless",
},
},
},
});

// Configure the adapter with Web3Auth
web3authInstance.configureAdapter(authAdapter);

// Initialize Modal
await web3authInstance.initModal();

// Login with SMS Passwordless
await web3authInstance.connect();