aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlambda <pleromagit@rogerbraun.net>2018-06-14 07:13:05 +0000
committerlambda <pleromagit@rogerbraun.net>2018-06-14 07:13:05 +0000
commit280ac243aa8593cf5e16a96a0a887f5cbfce50d0 (patch)
tree03daf72d77688ffc6e4bc31704ab3d028264f16e /lib
parent408152e232f8a156f2db9d2cdb4eafc9afc0ae41 (diff)
parent544246656906714b895e077f940900fb0cd07068 (diff)
downloadpleroma-280ac243aa8593cf5e16a96a0a887f5cbfce50d0.tar.gz
Merge branch 'bugfix/oauth-password-with-email' into 'develop'
oauth: fix password-based login when username is email address Closes #199 See merge request pleroma/pleroma!220
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/oauth/oauth_controller.ex2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex
index 3dd87d0ab..47962bbf8 100644
--- a/lib/pleroma/web/oauth/oauth_controller.ex
+++ b/lib/pleroma/web/oauth/oauth_controller.ex
@@ -84,7 +84,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do
%{"grant_type" => "password", "name" => name, "password" => password} = params
) do
with %App{} = app <- get_app_from_request(conn, params),
- %User{} = user <- User.get_cached_by_nickname(name),
+ %User{} = user <- User.get_by_nickname_or_email(name),
true <- Pbkdf2.checkpw(password, user.password_hash),
{:ok, auth} <- Authorization.create_authorization(app, user),
{:ok, token} <- Token.exchange_token(app, auth) do