I know this is an old topic, but I worked with
# Inside SessionController < Devise::SessionsController def create self.resource = warden.authenticate!(auth_options) sign_in(resource_name, resource) # this will set cookie end
It was developed specifically, but when checking the auth_options method in controller development, I found this code fragment here :
# File 'app/controllers/devise/sessions_controller.rb', line 45 def auth_options { scope: resource_name, recall: "#{controller_path}#new" } end
Hope this helps.
source share