Fix confusing screen when visiting a confirmation link for an already-confirmed email (#27368)
This commit is contained in:
parent
9a3d047f3e
commit
49b8433c56
5 changed files with 49 additions and 9 deletions
|
@ -39,6 +39,12 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
|
|||
show
|
||||
end
|
||||
|
||||
def redirect_to_app?
|
||||
truthy_param?(:redirect_to_app)
|
||||
end
|
||||
|
||||
helper_method :redirect_to_app?
|
||||
|
||||
private
|
||||
|
||||
def require_captcha_if_needed!
|
||||
|
@ -82,7 +88,7 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
|
|||
end
|
||||
|
||||
def after_confirmation_path_for(_resource_name, user)
|
||||
if user.created_by_application && truthy_param?(:redirect_to_app)
|
||||
if user.created_by_application && redirect_to_app?
|
||||
user.created_by_application.confirmation_redirect_uri
|
||||
elsif user_signed_in?
|
||||
web_url('start')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue