heartcombo / devise

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

Allow Devise modules to register multiple routes #5630

Open abevoelker opened 1 year ago

abevoelker commented 1 year 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.