mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 16:40:29 +00:00
[#2130] Fixed OAuth OOB authentication for users with enabled MFA.
This commit is contained in:
parent
9d20d29a79
commit
cad69669fc
3 changed files with 6 additions and 3 deletions
|
@ -145,7 +145,10 @@ defmodule Pleroma.Web.OAuth.OAuthController do
|
||||||
def after_create_authorization(%Plug.Conn{} = conn, %Authorization{} = auth, %{
|
def after_create_authorization(%Plug.Conn{} = conn, %Authorization{} = auth, %{
|
||||||
"authorization" => %{"redirect_uri" => @oob_token_redirect_uri}
|
"authorization" => %{"redirect_uri" => @oob_token_redirect_uri}
|
||||||
}) do
|
}) 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
|
end
|
||||||
|
|
||||||
def after_create_authorization(%Plug.Conn{} = conn, %Authorization{} = auth, %{
|
def after_create_authorization(%Plug.Conn{} = conn, %Authorization{} = auth, %{
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<h1>Successfully authorized</h1>
|
<h1>Successfully authorized</h1>
|
||||||
<h2>Token code is <%= @auth.token %></h2>
|
<h2>Token code is <br><%= @auth.token %></h2>
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
<h1>Authorization exists</h1>
|
<h1>Authorization exists</h1>
|
||||||
<h2>Access token is <%= @token.token %></h2>
|
<h2>Access token is <br><%= @token.token %></h2>
|
||||||
|
|
Loading…
Reference in a new issue