From cac78a4f4eced88878e746d96b305ecc62826494 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Tue, 31 Jan 2023 14:01:35 -0700 Subject: Move to discord oauth --- config/config.exs | 5 +++-- config/runtime.exs | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'config') diff --git a/config/config.exs b/config/config.exs index e9fca38..44230ae 100644 --- a/config/config.exs +++ b/config/config.exs @@ -17,8 +17,9 @@ config :chessh, RateLimits, create_game_rate: 2 config :chessh, Web, - github_oauth_login_url: "https://github.com/login/oauth/access_token", - github_user_api_url: "https://api.github.com/user" + discord_oauth_login_url: "https://discord.com/api/oauth2/token", + discord_user_api_url: "https://discord.com/api/users/@me", + discord_scope: "identify" config :joken, default_signer: "secret" diff --git a/config/runtime.exs b/config/runtime.exs index dfd8427..2be7431 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -1,14 +1,14 @@ import Config config :chessh, - ssh_port: String.to_integer(System.get_env("SSH_PORT", "42069")) + ssh_port: String.to_integer(System.get_env("SSH_PORT", "34355")) config :chessh, Web, - github_client_id: System.get_env("GITHUB_CLIENT_ID"), - github_client_secret: System.get_env("GITHUB_CLIENT_SECRET"), - github_user_agent: System.get_env("GITHUB_USER_AGENT"), + discord_client_id: System.get_env("DISCORD_CLIENT_ID"), + discord_client_secret: System.get_env("DISCORD_CLIENT_SECRET"), + discord_user_agent: System.get_env("DISCORD_USER_AGENT"), client_redirect_after_successful_sign_in: - System.get_env("CLIENT_REDIRECT_AFTER_OAUTH", "http://localhost:3000"), + System.get_env("CLIENT_REDIRECT_AFTER_OAUTH", "http://127.0.0.1:3000/oauth-successfule"), port: String.to_integer(System.get_env("WEB_PORT", "8080")) config :joken, -- cgit v1.2.3-70-g09d2