Search code examples
rubysmstwilioruby-on-rails-5two-factor-authentication

SMS service for two-factor authentication in Rails


I have already implemented two-factor authentication using the tinfoil gem in Rails. It's using Google Authenticator to display the verification code to the user.

I would also like to implement sending the verification code to the user via SMS. I am wondering what is the best solution for this?

I have also searched around and found free SMS services for Rails like SMS FU and SMS-easy, but it seems like the gems are not active and they don't support a lot of the UK carriers.

So, should I resort to paid service like twilio?


Solution

  • Twilio developer evangelist here.

    For something important like two factor authentication, where you need the messages to arrive or your user cannot log in, then I highly recommend a paid service.

    StackOverflow is not exactly the right site to be asking for opinions on this sort of thing, it is more for code issues that can be solved. However, if you are interested in using Twilio for this and you find yourself with any questions about the service, you can contact me directly at philnash@twilio.com.