aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/oauth/oauth_controller.ex
diff options
context:
space:
mode:
authorkaniini <ariadne@dereferenced.org>2019-10-02 07:04:33 +0000
committerkaniini <ariadne@dereferenced.org>2019-10-02 07:04:33 +0000
commit89ab673d00b4dd96fd29f35d7c355b777b9ec0c7 (patch)
tree42a1a2f8106cfb94326052c5926ebef01d8cbb27 /lib/pleroma/web/oauth/oauth_controller.ex
parent8557176808a0f3bbbc69a5c2eb90f4ed032dd70a (diff)
parentb2273c695ec3a84dfb7a3a83019a71cade08b8d4 (diff)
downloadpleroma-89ab673d00b4dd96fd29f35d7c355b777b9ec0c7.tar.gz
Merge branch 'feature/send-identifier-on-oauth-error' into 'develop'
Send an identifier alongside with error message in OAuthController See merge request pleroma/pleroma!1765
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r--lib/pleroma/web/oauth/oauth_controller.ex24
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)