> For the complete documentation index, see [llms.txt](/llms.txt).

# SMS OTP login with Embedded Wallets

Web3Auth provides built-in support for email and SMS-based authentication, allowing users to log in seamlessly using a one-time passcode (OTP) sent to their email address or phone number. This form of passwordless authentication simplifies the onboarding process, removes friction for end users, and expands accessibility—especially in regions where social login options may be limited.

![SMS OTP Onboarding](/assets/images/sms-otp-onboarding-8baec498841e3b201d694c345b6103c8.png) 

## Set up a custom SMS OTP connection[​](#set-up-a-custom-sms-otp-connection "Direct link to Set up a custom SMS OTP connection")

Enable on dashboard

To use this feature, developers must first enable **SMS OTP** from the **Social Connections** section in the [dashboard](https://developer.metamask.io).

By default, Web3Auth uses its own pre-configured credentials for SMS OTP login.

![SMS OTP Toggle](/assets/images/sms-otp-toggle-a81bd77c78231ef979cf2e3c4073f914.png) 

For enhanced control and branding, developers are encouraged to configure a custom SMS OTP connection. Follow these steps:

1. Visit the [dashboard](https://developer.metamask.io).
2. Go to the **Social Connections** section.
3. Click the **Settings** icon next to the toggle for **SMS OTP**.
4. Enter your custom `Auth Connection ID`.
5. Click **Add Connection** to complete the setup.
![SMS OTP Add Connection](/assets/images/sms-otp-add-connection-789edc653cccdc2cf73c78988ff2b08d.png) 

## Usage[​](#usage "Direct link to Usage")

web3authContext.tsx

```
import { WALLET_CONNECTORS, WEB3AUTH_NETWORK } from '@web3auth/modal'
import { type Web3AuthContextConfig } from '@web3auth/modal/react'

const web3AuthContextConfig: Web3AuthContextConfig = {
  web3AuthOptions: {
    clientId: 'YOUR_WEB3AUTH_CLIENT_ID', // Pass your Web3Auth Client ID, ideally using an environment variable
    web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_MAINNET,
    modalConfig: {
      connectors: {
        [WALLET_CONNECTORS.AUTH]: {
          label: 'auth',
          loginMethods: {
            sms_passwordless: {
              name: 'SMS Passwordless',
              authConnection: AUTH_CONNECTION.SMS_PASSWORDLESS,
              authConnectionId: 'sms-test-demo', // Replace with your custom SMS OTP Auth Connection ID
            },
          },
        },
      },
    },
  },
}

export default web3AuthContextConfig

```

## Next steps[​](#next-steps "Direct link to Next steps")

Follow our [quickstart](/quickstart/?product=EMBEDDED%5FWALLETS&walletAggregatorOnly=NO&framework=REACT&stepIndex=0) to set up the basic flow.
