0.0
No commit activity in last 3 years
No release in over 3 years
Replace devise confirmable with a pin emailed to users which they enter after signup
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 4.0
>= 5.0.0.1, ~> 5.0.0
 Project Readme

Pinfirmable

A replacement for Devise confirmable to use a pin rather than an emailed link to confirm a users email. (Inspired by Slack)

Installation

Add this line to your application's Gemfile:

gem 'pinfirmable'

And then execute:

$ bundle

Add the pinfirmable module to your devise model (e.g User)

class User < ApplicationRecord
  devise :database_authenticatable,
         :registerable,
         ...
         :pinfirmable
rake db:migrate
# If your devise model isn't called user
rake db:migrate MODEL=admin

Add the javascript include to the asset pipeline.

//= require pinfirmable

Skip Emails

To skip the pinfirmable email when creating a user (e.g. when seeding a database) the skip_pinfirmation! method is available

user = User.new
# setup the user
user.skip_pinfirmation!
user.save

Development set up

Check out the project and then run

rake db:setup

To create and migrate a development and test database.

Run rspec to run the tests.

Todo

  • Encrypt the pin in the DB

License

The gem is available as open source under the terms of the MIT License.