Project

devise_ott

0.01
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Adds one time token authentication to devise
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 0
>= 0
 Project Readme

# 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