Commit 0901969a authored by June's avatar June
Browse files

Rotate out Discord keys that were hard-coded and accidentally leaked when the repo was made public

parent a6ee06cf
......@@ -7,6 +7,7 @@ namespace MomentaryMeeting
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using MomentaryMeeting.Game;
......@@ -22,10 +23,12 @@ namespace MomentaryMeeting
public class Startup
{
private readonly IWebHostEnvironment _env;
private readonly IConfiguration _configuration;
public Startup(IWebHostEnvironment env)
public Startup(IWebHostEnvironment env, IConfiguration configuration)
{
_env = env;
_configuration = configuration;
}
public void ConfigureServices(IServiceCollection services)
......@@ -76,8 +79,8 @@ namespace MomentaryMeeting
})
.AddDiscord(options =>
{
options.ClientId = "804283491000778792";
options.ClientSecret = "KjAqOrH4kaxUSqdIVkERC-iulEYP4-WR";
options.ClientId = _configuration.GetValue<string>("Discord:ClientId");
options.ClientSecret = _configuration.GetValue<string>("Discord:ClientSecret");
options.CallbackPath = "/login/discord";
options.Scope.Add("identify");
options.Scope.Add("email");
......@@ -95,7 +98,7 @@ namespace MomentaryMeeting
{
using (var client = new DiscordRestClient())
{
await client.LoginAsync(TokenType.Bot, "ODA0MjgzNDkxMDAwNzc4Nzky.YBKFXw.FwkhT-0B0-i8xfqhHdM0Or8QfUQ");
await client.LoginAsync(TokenType.Bot, _configuration.GetValue<string>("Discord:BotToken"));
await client.AddGuildUserAsync(
449194702005207040,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment