Skip to main content

SMS connectors

Configuring an SMS connector allows you to send a one-time passwords (OTPs) to the user's phone number. This passwordless authentication mechanism can be utilized in various scenarios, including sign-up, sign-in, forgot password, link-account processes, member invitations and validate the user's identity. It streamlines user authentication and enhances security by minimizing the risk of password-related breaches.

Choose your SMS connector

Logto has some built-in SMS connectors which allow out-of-box usage:

If our standard connectors don't meet your specific requirements, don't hesitate to contact us. For OSS users, you can implement your connector (OSS) if the requirement is in urgent. We always welcome contributions; your effort could very well help other community members with the same needs.

Configuration steps

Follow the steps below to add a SMS connector:

  1. Navigate to Console > Connector > Email and SMS connectors.
  2. To add a new SMS connector, click the "Set up" button and select your desired SMS provider.
  3. Review the README documentation for your chosen provider.
  4. Complete the required fields in the "Parameter Configuration" section.
  5. Customize the SMS template using the JSON editor.
  6. Test your configuration by sending a verification code to your phone using the "Generic" template.
  7. Click "Save and Done" to finish.

Change SMS connector

To change to another SMS connector:

  • Access the connector details page and click "Change connector" in the top-right corner
  • Alternatively, delete the existing connector and create a new one

Note: You can bring ONLY ONE SMS connector alive.

When you already have an SMS connector, you can only select "Change SMS connector". When performing this operation in the console, it takes effect immediately once saved, so please be sure to test your configuration before saving.

To ensure the stability of your service, Cloud users can create a dev tenant for the development environment. After testing the configuration in the development environment, "migrate" the configuration to production, and then save the setup.

Enable phone number sign-up or sign-in

Once you successfully add the SMS connector and complete the configuration, you can enable sign-in and sign-up configurations that rely on phone + verification code, according to your business needs.

  1. Navigate to: Console > Sign-in experience > Sign-up and sign-in
  2. Set sign-up methods: Choose "Phone number" or "Email address or phone number" as the sign-up identifier. Note: Phone number verification is currently mandatory during sign-up.
  3. Set sign-in methods: The chosen sign-up identifier automatically becomes a sign-in method. Click "Add another" for additional sign-in options.
  4. Save Changes and Test: Click "Save changes" to implement the new sign-in experience. Remember to use the "Live preview" to test the functionality.
warning

Because our configurations take effect immediately, deleting existing SMS connector can affect end-users' normal login and registration processes.

For example, if the sign-in identifier includes "phone number + verification code" combination, deleting the existing SMS connector will prevent users from receiving verification codes via email and will result in an error in the sign-in flow.

Please be aware of the potential risks when operating on connectors.

FAQs

Logto doesn't have the SMS connector I want to use. What should I do?

We're still working on more connectors. If you require further options, just let us know your needs in Discord and file a Feature Request on GitHub. If you need further assistance, you can also contact us via email.

For open-source Logto users, we provide an easy-to-extend connector creation method, allowing you to customize your own connector based on your specific scenarios. You are always welcomed to submit a pull request to Logto, so that others in the community may also benefit from your work.