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.
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!
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.
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?
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.