Change the redirection to sign_in in Devise. Ie after the form "get a pass"

I need to consult with Devise :)) I have the first page in my application, and I have included an authorization form in it. It works correctly, but when the system wants to receive from me, it throws me to / users / sign _in. (i.e. after the "return recovery"). What should I do to make my page the default page for sign_in?

+4
source share
2 answers

You can override the following:

# The path used after resending confirmation instructions. def after_resending_confirmation_instructions_path_for(resource_name) new_session_path(resource_name) end 

if you extend Devise::ConfirmationsController . Devise README contains a small section on configuring / expanding Devise controllers.

0
source

There are also a few callbacks you can override:

after successful registration

def after_sign_up_path_for (resource) end

after successful login

def after_sign_in_path_for (resource) end

0
source

Source: https://habr.com/ru/post/1443387/


All Articles