Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 line
480B

  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2020 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. def render("mfa_response.json", %{token: token, user: user}) do
  9. %{
  10. error: "mfa_required",
  11. mfa_token: token.token,
  12. supported_challenge_types: MFA.supported_methods(user)
  13. }
  14. end
  15. end