aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/oauth/oauth_controller.ex
diff options
context:
space:
mode:
authorIvan Tashkinov <ivantashkinov@gmail.com>2020-09-09 22:44:38 +0300
committerIvan Tashkinov <ivantashkinov@gmail.com>2020-09-09 22:44:38 +0300
commitcad69669fc692da360929a5961e96550de1f1fe1 (patch)
tree880f80186b4288c33809e0300392e731261d8446 /lib/pleroma/web/oauth/oauth_controller.ex
parent9d20d29a79f4ea0756f4e2c7f387674f57513b6d (diff)
downloadpleroma-cad69669fc692da360929a5961e96550de1f1fe1.tar.gz
[#2130] Fixed OAuth OOB authentication for users with enabled MFA.
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r--lib/pleroma/web/oauth/oauth_controller.ex5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex
index dd00600ea..06b116368 100644
--- a/lib/pleroma/web/oauth/oauth_controller.ex
+++ b/lib/pleroma/web/oauth/oauth_controller.ex
@@ -145,7 +145,10 @@ defmodule Pleroma.Web.OAuth.OAuthController do
def after_create_authorization(%Plug.Conn{} = conn, %Authorization{} = auth, %{
"authorization" => %{"redirect_uri" => @oob_token_redirect_uri}
}) do
- render(conn, "oob_authorization_created.html", %{auth: auth})
+ # Enforcing the view to reuse the template when calling from other controllers
+ conn
+ |> put_view(OAuthView)
+ |> render("oob_authorization_created.html", %{auth: auth})
end
def after_create_authorization(%Plug.Conn{} = conn, %Authorization{} = auth, %{