Project

magic-link

0.06
No release in over 3 years
Low commit activity in last 3 years
There's a lot of open issues
Devise magic sign in links
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

>= 4.7.1
>= 5.2.2.1
 Project Readme

Magic::Link

Short description and motivation.

Usage

configure the gem

# config/initializers/magic_link.rb
Magic::Link.configure do |config|
  config.user_class = "Customer" # Default is User
  config.email_from = "test@yourapp.com"
  config.token_expiration_hours = 6 # Default is 6
end

Add sign_in_token and sign_in_token_sent_at to your Devise class

mount the engine

mount Magic::Link::Engine, at: '/'

Now users can visit /magic_links/new (which you can link to with magic_link.new_magic_link_path) to enter their email and have a sign in link sent to them via email. Tokens are cleared after use and expire after the configured number of hours

Installation

Add this line to your application's Gemfile:

gem 'magic-link'

And then execute:

$ bundle

Or install it yourself as:

$ gem install magic-link

Contributing

Contribution directions go here.

License

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