diff options
author | lain <lain@soykaf.club> | 2019-06-05 11:05:32 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2019-06-05 11:05:32 +0000 |
commit | eda4b00a6a76dc282fe83582e7e24209379d4025 (patch) | |
tree | 9df0f775899a1d66d5a96127807c3d631d2e8f0d /lib/pleroma/web/oauth/oauth_controller.ex | |
parent | e4babb1c9ff4c28ff08888736cc330a48b19b396 (diff) | |
parent | 3eefb274f45e57ad855246cb930a6a094eeffe0e (diff) | |
download | pleroma-eda4b00a6a76dc282fe83582e7e24209379d4025.tar.gz |
Merge branch 'oauth_consumer_support_code' into 'develop'
OAuth consumer: tests fix, comments, Keycloak config notes
See merge request pleroma/pleroma!1248
Diffstat (limited to 'lib/pleroma/web/oauth/oauth_controller.ex')
-rw-r--r-- | lib/pleroma/web/oauth/oauth_controller.ex | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/web/oauth/oauth_controller.ex b/lib/pleroma/web/oauth/oauth_controller.ex index ae2b80d95..79d803295 100644 --- a/lib/pleroma/web/oauth/oauth_controller.ex +++ b/lib/pleroma/web/oauth/oauth_controller.ex @@ -17,6 +17,8 @@ defmodule Pleroma.Web.OAuth.OAuthController do alias Pleroma.Web.OAuth.Token.Strategy.Revoke, as: RevokeToken alias Pleroma.Web.OAuth.Scopes + require Logger + if Pleroma.Config.oauth_consumer_enabled?(), do: plug(Ueberauth) plug(:fetch_session) @@ -318,7 +320,9 @@ defmodule Pleroma.Web.OAuth.OAuthController do |> registration_details(%{"authorization" => registration_params}) end else - _ -> + error -> + Logger.debug(inspect(["OAUTH_ERROR", error, conn.assigns])) + conn |> put_flash(:error, "Failed to set up user account.") |> redirect(external: redirect_uri(conn, params["redirect_uri"])) |