logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

mfa_view.ex (508B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Web.OAuth.MFAView do
  5. use Pleroma.Web, :view
  6. import Phoenix.HTML.Form
  7. alias Pleroma.MFA
  8. alias Pleroma.Web.Gettext
  9. def render("mfa_response.json", %{token: token, user: user}) do
  10. %{
  11. error: "mfa_required",
  12. mfa_token: token.token,
  13. supported_challenge_types: MFA.supported_methods(user)
  14. }
  15. end
  16. end