I am attempting to write my own Devise authentication module following the procedure outlined in http://4trabes.com/2012/10/31/remote-authentication-with-devise/
I've created a User class under app/models and Devise::Models and Devise::Strategies modules under lib. I've also added:
require 'remote_authenticatable'
config.warden do |manager|
manager.strategies.add(:remote, Devise::Strategies::RemoteAuthenticatable)
manager.default_strategies(:scope => :user).unshift :remote
end
to my initializers/devise.rb file.
And I've added:
devise_for :users
to my routes.rb
However, for some reason the sign_on and sign_off routes do not appear in my rake routes.
Is there some good documentation on how the Devise plugin works with these kinds of extensions?
Peter.
Ok, I figured it out.
I needed to add
Devise.add_module :remote_authenticatable, :controller => :sessions, :route => { :session => :routes }
to my config/initializers/devise file. Can anyone explain what this line does? With particular focus on the last two parameters?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With