aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/oauth/oauth_controller.ex
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-09-10 18:38:48 +0000
committerrinpatch <rinpatch@sdf.org>2020-09-17 19:51:54 +0300
commit6bbd65fb0922c5e7ed4877968c3c92ff51cc12cb (patch)
tree84e10b584e177fbf0e57e9ee3142c0d1adeca90d /lib/pleroma/web/oauth/oauth_controller.ex
parent608017b7df5916b607e707627dc09d89599129ff (diff)
downloadpleroma-6bbd65fb0922c5e7ed4877968c3c92ff51cc12cb.tar.gz
Merge branch '2130-mfa-users-oauth-login-fix' into 'develop'
[#2130] Fixed OAuth OOB authentication for users with enabled MFA Closes #2130 See merge request pleroma/pleroma!2979
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, %{