Implementing SMS OTP Authentication with WeWeb + XANO + SMS Service

Hi everyone,

I’m currently working on a project using WeWeb and XANO, and I’m looking to implement SMS-based OTP (One-Time Password) authentication. The idea is to allow users to log in using their phone number, receive an OTP via SMS, and then verify their login by entering the OTP.

Has anyone implemented SMS OTP authentication using WeWeb, XANO, and a third-party SMS service? I would love to hear how you approached it or if there are any best practices to consider. Is this something feasible with the current WeWeb workflow, and how well does it integrate with XANO?

Any insights or advice would be greatly appreciated!

Thanks in advance!

Hi @alnkde,
That is something I am also wanting to develop, but still far ahead in my roadmap.

I would see this working with something like Twilio or Telnyx and using the “Middleware” feature in XANO

Middleware can serve as a “firewall” validation for the codes before executing the login API for the user.

1 Like

If you want use third party otp service, you can try shreetripada.com

Hi @alnkde ,

With Xano, the simplest way would be to just use a (random) SMS API service. If you search for that there’s endless options. Your work flow would be something like:

  1. Submit username via Weweb to Xano
  2. Do your checks in Xano (active member, etc.)
  3. Generate and store random code in user table
  4. Trigger SMS api and send that random code
  5. Have the user submit that random code via Weweb to Xano (via the Xano auth action)
  6. Check random code in Xano (perhaps that it’s within X minutes of creation) and login
1 Like