diff options
author | lambda <pleromagit@rogerbraun.net> | 2018-04-18 11:26:38 +0000 |
---|---|---|
committer | lambda <pleromagit@rogerbraun.net> | 2018-04-18 11:26:38 +0000 |
commit | a80cdd590648d4eb812503fbf995598e6b4a95cb (patch) | |
tree | 24a65608c90e7962a4b15d1676a0895301d6404f /lib/pleroma/web/oauth/oauth_controller.ex | |
parent | e153b364a71de431787db236c57114f229162ddf (diff) | |
parent | 947431e9aa1d4dbf85f9ccc270f1989737744ed4 (diff) | |
download | pleroma-a80cdd590648d4eb812503fbf995598e6b4a95cb.tar.gz |
Merge branch 'fix/login-with-username-or-email' into 'develop'
MastoAPI and OAuth: allow login with either email or username.
See merge request pleroma/pleroma!118
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r-- | lib/pleroma/web/oauth/oauth_controller.ex | 2 |
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 05f366611..6297b7bae 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -29,7 +29,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do "redirect_uri" => redirect_uri } = params }) do - with %User{} = user <- User.get_cached_by_nickname(name), + with %User{} = user <- User.get_by_nickname_or_email(name), true <- Pbkdf2.checkpw(password, user.password_hash), %App{} = app <- Repo.get_by(App, client_id: client_id), {:ok, auth} <- Authorization.create_authorization(app, user) do |