jazzband / django-two-factor-auth

Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects.
MIT License
1.65k stars 447 forks source link

Feature request: Add support for using Twilio Verify instead of Twilio Messaging #710

Open Bastien-Brd opened 5 months ago

Bastien-Brd commented 5 months ago

This is a feature request for ability to leverage the Twilio Verify service instead of a unique Twilio Messaging phone number or Twilio Messaging Service. Twilio Verify does not require people to register phone numbers in various countries and to worry about which country can receive messages or calls from which numbers, or deal with regulatory registrations in various countries etc. It just sends messages where you want from Twilio's own managed numbers and guarantees delivery.

Context

Since 2023 sending SMS to USA phone numbers has become complicated and requires registering a Campaign in Twilio and a A2P license etc. We noticed SMS messages stopped being delivered to US numbers because we were sending from a UK number in Twilio. We had configured our dajngo app to use that one number, as djano-two-factor only supported using one single fixed sending number defined in django settings.

We realise now we can use Twilio Messaging Services instead of a single phone number and we will do so, so we have a pool of US and UK and other phone numbers to send from.

However, even better would be the ability to use the Twilio Verify service, where we don't even need to think about any of these regulatory and deliverability concerns across countries.

The Twilio Verify API and Python SDK looks clear and it should not be too hard to add a django-two-factor plugin supporting it.

claudep commented 5 months ago

That makes sense, however if you want that to happen, you probably will have to contribute a patch (or find someone to do it).