# Passwordless auth: Custom sms provider with twilio verify

**URL:** <https://community.auth0.com/t/passwordless-auth-custom-sms-provider-with-twilio-verify/115373>\
**Category:** Get Help\
**Tags:** one-time-password-otp-factor, mfa\
**Created:** [September 4, 2023, 8:23pm UTC](https://community.auth0.com/t/passwordless-auth-custom-sms-provider-with-twilio-verify/115373 "2023-09-04T20:23:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![artak](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/artak/32/50443_2.png) [@artak](https://community.auth0.com/u/artak)\
**Post date:** [September 4, 2023, 8:23pm UTC](https://community.auth0.com/t/passwordless-auth-custom-sms-provider-with-twilio-verify/115373/1 "2023-09-04T20:23:41Z")

</div>

More then a year we used passwordless auth with twilio, everything was good. But now because of this [https://support.twilio.com/hc/en-us/articles/1260800720410-What-is-A2P-10DLC-](https://support.twilio.com/hc/en-us/articles/1260800720410-What-is-A2P-10DLC-) it stopped working, so we want to move to the twilio verify. From the docs it’s not very clear how to do [Set Up Custom SMS Gateway for Passwordless Connections](https://auth0.com/docs/authenticate/passwordless/authentication-methods/use-sms-gateway-passwordless)

Also I saw this and if this answer still true (no Basic auth support from the auth0) [Custom sms provider](https://community.auth0.com/t/custom-sms-provider/109743) then I guess it’s not possible to do using custom sms provider. Is there any suggestions or options?

Thanks.

---

<div class="post-metadata">

**Author:** ![Flotemer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/flotemer/32/45589_2.png) [@Flotemer](https://community.auth0.com/u/Flotemer)\
**Post date:** [July 9, 2024, 8:20pm UTC](https://community.auth0.com/t/passwordless-auth-custom-sms-provider-with-twilio-verify/115373/2 "2024-07-09T20:20:49Z")

</div>

What did you end up doing for your use case here? We have a similiar issue as it seem twilio verify does not integrate well with auth 0

---

<div class="post-metadata">

**Author:** ![artak](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/artak/32/50443_2.png) [@artak](https://community.auth0.com/u/artak)\
**Post date:** [July 9, 2024, 9:04pm UTC](https://community.auth0.com/t/passwordless-auth-custom-sms-provider-with-twilio-verify/115373/3 "2024-07-09T21:04:17Z")

</div>

Personal recommendation: After using more then 2 years I can say that it’s not worth to use Auth0 as a authentication provider, it’s better to spent bit more time and use your frameworks library. Over time you will have lot’s of headaches and less control with auth0.

As a solution this worked for me:

I used [connection api](https://auth0.com/docs/api/management/v2/connections/patch-connections-by-id) to proxy sign in code to my backend and then manually sending that code to the users phone number using twilio verify api.

```auto
{
    "options": {
      "strategy": "sms",
      "provider": "sms_gateway",
      "gateway_url": "<MY-DOMAIN>/your/sms-verification/api",
      "from": "<FROM_PHONE_NUMBER>",
      "template": "Your <APP_NAME> verification code is: @@password@@",
      "brute_force_protection": true,
      "forward_req_info": "true",
      "disable_signup": false,
      "name": "sms",
      "syntax": "md_with_macros",
      "totp": {
        "time_step": 300,
        "length": 4
      }
    },
    "is_domain_connection": false,
    "enabled_clients": [
            "<CLIENT_ID_1>",
            "<CLIENT_ID_2>",
            "<AND_SO_ON:CHOSSE_WHICH_ONE_YOU_WANT>",
    ]
}

```

after this every time someone sign-ins your backend will receive POST request from auth0 which contains sms text inside json body, ex. “Your AppName verification code is: 1234”, you can extract code from the text and send it using [twilio verify api](https://www.twilio.com/docs/verify/api/customization-options#custom-verification-codes) or other sms service.

---

<div class="post-metadata">

**Author:** ![Flotemer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/flotemer/32/45589_2.png) [@Flotemer](https://community.auth0.com/u/Flotemer)\
**Post date:** [July 9, 2024, 10:09pm UTC](https://community.auth0.com/t/passwordless-auth-custom-sms-provider-with-twilio-verify/115373/4 "2024-07-09T22:09:05Z")

</div>

> [@artak](#):
>
> connection api

Thanks. This helps alot. I’ve been feeling the same way about whether to continue using auth 0 or not given its only been headaches since implementing.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [July 23, 2024, 10:09pm UTC](https://community.auth0.com/t/passwordless-auth-custom-sms-provider-with-twilio-verify/115373/5 "2024-07-23T22:09:56Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
