This is an example application to show how to add two factor authentication to a Rails app with Devise and Authy.
You can run the app with the following commands:
$ git clone https://github.com/philnash/super-secret-puppies.git
$ cd super-secret-puppies
$ bundle install
$ bundle exec rails server
You will have to look out for a blog post with all the details. The completed application is in the complete branch.