diff options
author | Logan Hunt <logan.hunt@usu.edu> | 2023-01-31 14:01:35 -0700 |
---|---|---|
committer | Logan Hunt <logan.hunt@usu.edu> | 2023-01-31 14:04:23 -0700 |
commit | cac78a4f4eced88878e746d96b305ecc62826494 (patch) | |
tree | 33d1d43d7049a30753af82bab600f721e9f8ac67 /config | |
parent | e5d97870a12ec87bd463b7657923bb79d3bcb4cc (diff) | |
download | chessh-cac78a4f4eced88878e746d96b305ecc62826494.tar.gz chessh-cac78a4f4eced88878e746d96b305ecc62826494.zip |
Move to discord oauth
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 5 | ||||
-rw-r--r-- | config/runtime.exs | 10 |
2 files changed, 8 insertions, 7 deletions
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, |