A simple Ruby on Rails implementation of a website that uses Twilio Authy Two-factor Authentication to protect all assets within a folder. Additionally, it shows a Twilio Verify Phone Verification implementation.
It uses four channels for delivery, SMS, Voice, Soft Tokens, and Push Notifications. You should have the Authy App installed to try Soft Token and Push Notification support.
This app uses SQLite as a data store. You will have to install SQLite as well and make sure it is running.
- URL path "/protected" is protected with both user session and Twilio Authy Two-Factor Authentication
- One Time Passwords (SMS and Voice)
- SoftTokens
- Push Notifications (via polling)
- Phone Verification
- SMS or Voice Call
-
Clone this repo
git clone https://github.com/TwilioDevEd/account-security-quickstart-rails.git cd account-security-quickstart-rails
-
Run
bundle install
-
Register for a Twilio Account.
-
Setup an Account Security app via the Twilio Console.
-
Create your
application.yml
file from the existing example inconfig/application.example.yml
cp config/application.example.yml config/application.yml
-
Generate an Application API KEY from the Dashboard and paste it in
.env
-
Check and make sure SQLite is up and running
-
Run
bin/rails db:migrate
to create the tables -
Run
bin/rails server
to start the server
- MIT