diff options
author | lain <lain@soykaf.club> | 2019-10-02 13:27:55 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-10-02 13:27:55 +0200 |
commit | 557223b2b5b60956d3e1a19e9fdae9e9798c4fe2 (patch) | |
tree | 71d711f8932a2bd952f9f54ccef1322c55aed1d7 /lib/pleroma/web/oauth/oauth_controller.ex | |
parent | 19bc0b8c79765dc485e081651a4e4c589d18b970 (diff) | |
parent | 433f2c0f6854d2838819e08f0fb0a9e8cf058021 (diff) | |
download | pleroma-557223b2b5b60956d3e1a19e9fdae9e9798c4fe2.tar.gz |
Merge remote-tracking branch 'origin/develop' into reactions
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r-- | lib/pleroma/web/oauth/oauth_controller.ex | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex index a57670e02..e418dc70d 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -212,13 +212,31 @@ defmodule Pleroma.Web.OAuth.OAuthController do {:auth_active, false} -> # Per https://github.com/tootsuite/mastodon/blob/ # 51e154f5e87968d6bb115e053689767ab33e80cd/app/controllers/api/base_controller.rb#L76 - render_error(conn, :forbidden, "Your login is missing a confirmed e-mail address") + render_error( + conn, + :forbidden, + "Your login is missing a confirmed e-mail address", + %{}, + "missing_confirmed_email" + ) {:user_active, false} -> - render_error(conn, :forbidden, "Your account is currently disabled") + render_error( + conn, + :forbidden, + "Your account is currently disabled", + %{}, + "account_is_disabled" + ) {:password_reset_pending, true} -> - render_error(conn, :forbidden, "Password reset is required") + render_error( + conn, + :forbidden, + "Password reset is required", + %{}, + "password_reset_required" + ) _error -> render_invalid_credentials_error(conn) |