diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-07-09 16:56:06 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-07-09 16:56:06 +0300 |
commit | 17a2ff57ac589b6fb996583f38f542b365b01ccf (patch) | |
tree | dd19dc053927147c5b28742b1b2fbb743bcbb650 /lib/pleroma/web/oauth/mfa_controller.ex | |
parent | 3ce21ff4e8cc0d3c1a7481082fe574e1f9ff6466 (diff) | |
parent | 8ca1f3e8c61b906387e9cb6fb8993d2ad496ab3d (diff) | |
download | pleroma-17a2ff57ac589b6fb996583f38f542b365b01ccf.tar.gz |
merge develop
Diffstat (limited to 'lib/pleroma/web/oauth/mfa_controller.ex')
-rw-r--r-- | lib/pleroma/web/oauth/mfa_controller.ex | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/oauth/mfa_controller.ex b/lib/pleroma/web/oauth/mfa_controller.ex index 53e19f82e..f102c93e7 100644 --- a/lib/pleroma/web/oauth/mfa_controller.ex +++ b/lib/pleroma/web/oauth/mfa_controller.ex @@ -13,6 +13,7 @@ defmodule Pleroma.Web.OAuth.MFAController do alias Pleroma.Web.Auth.TOTPAuthenticator alias Pleroma.Web.OAuth.MFAView, as: View alias Pleroma.Web.OAuth.OAuthController + alias Pleroma.Web.OAuth.OAuthView alias Pleroma.Web.OAuth.Token plug(:fetch_session when action in [:show, :verify]) @@ -74,7 +75,7 @@ defmodule Pleroma.Web.OAuth.MFAController do {:ok, %{user: user, authorization: auth}} <- MFA.Token.validate(mfa_token), {:ok, _} <- validates_challenge(user, params), {:ok, token} <- Token.exchange_token(app, auth) do - json(conn, Token.Response.build(user, token)) + json(conn, OAuthView.render("token.json", %{user: user, token: token})) else _error -> conn |