add redirect handler

This commit is contained in:
Alex Turchyn
2023-08-24 00:28:21 +03:00
parent 88968897e9
commit e1342860c4
7 changed files with 40 additions and 5 deletions
+10
View File
@@ -12,6 +12,16 @@ class SessionsController < Devise::SessionsController
private
def after_sign_in_path_for(...)
if params[:redir].present?
return console_redirect_index_path(redir: params[:redir]) if params[:redir].starts_with?(Docuseal::CONSOLE_URL)
return params[:redir]
end
super
end
def require_no_authentication
super