# Getting bad.connection on passwordless authentication with sms auth0

**URL:** <https://community.auth0.com/t/getting-bad-connection-on-passwordless-authentication-with-sms-auth0/107486>\
**Category:** Get Help\
**Tags:** user-profile, user-management\
**Created:** [May 22, 2023, 6:14am UTC](https://community.auth0.com/t/getting-bad-connection-on-passwordless-authentication-with-sms-auth0/107486 "2023-05-22T06:14:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vishal.agarwal](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@vishal.agarwal](https://community.auth0.com/u/vishal.agarwal)\
**Post date:** [May 22, 2023, 6:14am UTC](https://community.auth0.com/t/getting-bad-connection-on-passwordless-authentication-with-sms-auth0/107486/1 "2023-05-22T06:14:31Z")

</div>

Hi, i am new to Auth0. I have setup the passwordless authentication with the email but when I am trying to setup it with sms I am getting error bad.connection and error description as unknown error.

I am using twilio test credentials. I have test these credentials with a sample php code and they are working fine. I am receiving text on my number.

I have enabled sms in the auth0 dashboard and allowed the application as well to use it.

 ![image](https://global.discourse-cdn.com/auth0/original/3X/2/0/20b00d55cdaafde35c9dec77e8bbb4b4c1105a70.png)

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [May 23, 2023, 12:11pm UTC](https://community.auth0.com/t/getting-bad-connection-on-passwordless-authentication-with-sms-auth0/107486/3 "2023-05-23T12:11:43Z")

</div>

Hey there and welcome to Auth0! 👋🏾

On your Auth0 tenant, under Rules, I can see a script determining the email domain as a factor to check for users to authenticate. For the passwordless connection with SMS, there is no email domain to be checked by this rule so it may cause the issue. You can verify if it by disabling for a while this rule and try to log in with SMS again.

As a side note, we do not recommend using rules neither hooks as they will be deprecated in less then 18 months. Actions (or other features) might be a good alternative.

Please let me know if that helped or if you still have this issue! Have a good day!

---

<div class="post-metadata">

**Author:** ![vishal.agarwal](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@vishal.agarwal](https://community.auth0.com/u/vishal.agarwal)\
**Post date:** [May 24, 2023, 4:05am UTC](https://community.auth0.com/t/getting-bad-connection-on-passwordless-authentication-with-sms-auth0/107486/4 "2023-05-24T04:05:45Z")

</div>

I initially added the Email Domain Whitelist rule but it is not enabled at the moment and it is still giving me this error.

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [May 24, 2023, 3:44pm UTC](https://community.auth0.com/t/getting-bad-connection-on-passwordless-authentication-with-sms-auth0/107486/6 "2023-05-24T15:44:39Z")

</div>

Thanks for your feedback, I can see you have correctly set your regular web app with the Passwordless Grant Flow.  
Also, you choose to use the _New Universal Login_ Experience.  
Based on the [documentation](https://auth0.com/docs/authenticate/passwordless/implement-login/embedded-login/relevant-api-endpoints):

> The `POST /passwordless/start` endpoint can be called to begin the Passwordless authentication process for both Classic Universal Login and Embedded Login.

It means that as a next check you could test your /passwordless/start call with the **Classic Universal Login** set on your Auth0 tenant to confirm/exclude this as a source of the error.

On the other hand, here you can find more about the options for passwordless authentication with the [New Universal Login](https://auth0.com/docs/authenticate/passwordless/passwordless-with-new-universal-login) Flow.

---

<div class="post-metadata">

**Author:** ![vishal.agarwal](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@vishal.agarwal](https://community.auth0.com/u/vishal.agarwal)\
**Post date:** [May 25, 2023, 5:04am UTC](https://community.auth0.com/t/getting-bad-connection-on-passwordless-authentication-with-sms-auth0/107486/7 "2023-05-25T05:04:51Z")

</div>

I tried the ‘try’ option as well when we setup the SMS details. It redirects to a new page with the form saying an OTP has been sent but I didnt receive any OTP.

Sorry but I did not understand what I need to do exactly. If its the above then I have already tried. Can you please guide me a little bit more?

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [May 29, 2023, 7:44am UTC](https://community.auth0.com/t/getting-bad-connection-on-passwordless-authentication-with-sms-auth0/107486/8 "2023-05-29T07:44:52Z")

</div>

Hey @vishal.agarwal, sure thing! Just set the Universal Login to “Classic” and test the `POST /passwordless/start` endpoint, as according to the documentation:

> The `POST /passwordless/start` endpoint can be called to begin the Passwordless authentication process for both Classic Universal Login and Embedded Login.

You can set this up in your Auth0 tenant: Branding-\> Universal Login → Advanced Options → choose “Classic”.  
Currently you run on “New” Universal Login.

---

<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:** [June 12, 2023, 7:45am UTC](https://community.auth0.com/t/getting-bad-connection-on-passwordless-authentication-with-sms-auth0/107486/9 "2023-06-12T07:45:16Z")

</div>

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