diff options
author | Ivan Tashkinov <ivant.business@gmail.com> | 2019-04-05 09:19:17 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivant.business@gmail.com> | 2019-04-05 09:19:17 +0300 |
commit | 3e7f2bfc2f4769af3cedea3126fa0b3cab3f2b7b (patch) | |
tree | e42944b9fac6994fcfdd390f08d1c23410fb9cd8 /lib | |
parent | 45765918c377c6daf8ee8e5bfad4ea24f67766b6 (diff) | |
download | pleroma-3e7f2bfc2f4769af3cedea3126fa0b3cab3f2b7b.tar.gz |
[#923] OAuthController#callback adjustments (with tests).
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/oauth/oauth_controller.ex | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex index 2dcaaabc1..404728899 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -249,13 +249,7 @@ defmodule Pleroma.Web.OAuth.OAuthController do with {:ok, registration} <- Authenticator.get_registration(conn, params) do user = Repo.preload(registration, :user).user - - auth_params = %{ - "client_id" => params["client_id"], - "redirect_uri" => params["redirect_uri"], - "state" => params["state"], - "scopes" => oauth_scopes(params, nil) - } + auth_params = Map.take(params, ~w(client_id redirect_uri scope scopes state)) if user do create_authorization( |