# DeviseOtt
<img src=“https://travis-ci.org/igagnidz/devise_ott.png” /> <img src=“https://coveralls.io/repos/igagnidz/devise_ott/badge.png” alt=“Coverage Status” /> <img src=“https://codeclimate.com/github/igagnidz/devise_ott.png” /> <img src=“http://badge.fury.io/rb/devise_ott.png” /> <img src=“https://gemnasium.com/igagnidz/devise_ott.png” alt=“Dependency Status” />
Adds one time token authentication to devise with sign in count and expiration
## Installation
Add this line to your application’s Gemfile:
gem 'devise_ott'
And then execute:
$ bundle install
Add :ott_authentication to your model
devise :ott_authentication
## Usage
Programatically register token for a given user:
DeviseOtt::Tokens.instance.register('random_token', 'user@email.com', 'requester@email.com', COUNT, EXPIRES_SECONDS) # COUNT and EXPIRES_SECONDS are integers
Login using One-Time Token:
include ott_token following parameter in the URL. Example: localhost:3000/?ott_token=random_token