An example application implementing SMS Two Factor Authentication using Twilio.
This project is built using Ruby on Rails Framework.
-
First clone this repository and
cd
into it.$ git clone git@github.com:TwilioDevEd/sms2fa-rails.git $ cd sms2fa-rails
-
Install the dependencies.
$ bundle install
-
Export the environment variables.
You can find the AccountSID and the AuthToken at https://www.twilio.com/user/account/settings.
$ export TWILIO_ACCOUNT_SID=Your Twilio Account SID $ export TWILIO_AUTH_TOKEN=Your Twilio Auth Token $ export TWILIO_NUMBER=Your Twilio Phone Number
-
Create database and run migrations.
Make sure you have installed PostgreSQL. If on a Mac, I recommend Postgres.app.
$ bundle exec rake db:setup
-
Make sure the tests succeed.
$ bundle exec rspec
-
Start the server.
$ bundle exec rails s
-
Check it out at http://localhost:3000.
That's it!
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.