heartcombo / devise

Flexible authentication solution for Rails with Warden.
http://blog.plataformatec.com.br/tag/devise/
MIT License
23.85k stars 5.53k forks source link

Allow Devise modules to register multiple routes #5630

Open abevoelker opened 10 months ago

abevoelker commented 10 months ago

This change was precipitated by https://github.com/abevoelker/devise-passwordless, a Devise extension which adds a :magic_link_authenticatable strategy which enables registration and sign-in via emailed magic links.

This change is needed we can register both a :magic_link and a :session route and controllers, because we need to both provide a custom sessions controller as well as handle magic links. We are currently monkey patching this logic in and it works great - Devise.add_module continues to work exactly the same for modules with singular routes.