diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-05-26 22:03:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-26 22:03:54 +0200 |
commit | 96129c2f10a82520648f6ae04e585cf797403617 (patch) | |
tree | f79f7302c33e695066c13e665e6d023ea05717e7 /app | |
parent | 3e0e7a1cfb617837ccada330afc13ed804c3c47b (diff) |
Fix confirmation redirect to app without `Location` header (#18523)
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/auth/confirmations_controller.rb | 2 | ||||
-rw-r--r-- | app/lib/application_extension.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/auth/confirmations_controller.rb b/app/controllers/auth/confirmations_controller.rb index 1475bbcef..010fd3755 100644 --- a/app/controllers/auth/confirmations_controller.rb +++ b/app/controllers/auth/confirmations_controller.rb @@ -40,7 +40,7 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController def after_confirmation_path_for(_resource_name, user) if user.created_by_application && truthy_param?(:redirect_to_app) - user.created_by_application.redirect_uri + user.created_by_application.confirmation_redirect_uri else super end diff --git a/app/lib/application_extension.rb b/app/lib/application_extension.rb index a1fea6430..d61ec0e6e 100644 --- a/app/lib/application_extension.rb +++ b/app/lib/application_extension.rb @@ -12,4 +12,8 @@ module ApplicationExtension def most_recently_used_access_token @most_recently_used_access_token ||= access_tokens.where.not(last_used_at: nil).order(last_used_at: :desc).first end + + def confirmation_redirect_uri + redirect_uri.lines.first.strip + end end |