From f05daabe0d5eed26d18579e6c17a3631d48be30d Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Tue, 31 Jan 2023 17:01:02 -0700 Subject: Incorrect server redirection uri fix --- lib/chessh/web/web.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/chessh/web') diff --git a/lib/chessh/web/web.ex b/lib/chessh/web/web.ex index 067a27c..7b2f696 100644 --- a/lib/chessh/web/web.ex +++ b/lib/chessh/web/web.ex @@ -32,7 +32,7 @@ defmodule Chessh.Web.Endpoint do case :httpc.request( :post, {String.to_charlist(discord_login_url), [], 'application/x-www-form-urlencoded', - 'scope=#{discord_scope}&client_id=#{client_id}&client_secret=#{client_secret}&code=#{req_token}&grant_type=authorization_code&redirect_uri=#{redirect_uri}'}, + 'scope=#{discord_scope}&client_id=#{client_id}&client_secret=#{client_secret}&code=#{req_token}&grant_type=authorization_code&redirect_uri=http://127.0.0.1:3000/api/oauth/redirect'}, [], [] ) do @@ -214,7 +214,7 @@ defmodule Chessh.Web.Endpoint do :discord_client_secret, :discord_user_api_url, :discord_user_agent, - :client_redirect_after_successful_sign_in + :server_redirect_uri ], fn key -> Application.get_env(:chessh, Web)[key] end ) -- cgit v1.2.3-70-g09d2