Getting bad.connection on passwordless authentication with sms auth0

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.

1 Like

Hey there and welcome to Auth0! :wave:t5:

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!

1 Like

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

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:

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 Flow.

1 Like

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?