Fix confusing screen when visiting a confirmation link for an already-confirmed email (#27368)
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user