From 660eadfbe2d1ba27645174077e1e83eafb6f1f8c Mon Sep 17 00:00:00 2001 From: Sarah Faey Date: Tue, 22 Nov 2022 23:22:57 +0100 Subject: [PATCH] moved discord app secret to file and changed it --- .gitignore | 1 + Lieb/Program.cs | 2 +- Lieb/appsettings.json | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4a75bf1..6394535 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ Database/ # Discord Tokens DiscordBot/token.txt DiscordBot/debugtoken.txt +Lieb/discordAppSecret.txt # Build results [Dd]ebug/ diff --git a/Lieb/Program.cs b/Lieb/Program.cs index f5845f7..fa852d3 100644 --- a/Lieb/Program.cs +++ b/Lieb/Program.cs @@ -42,7 +42,7 @@ builder.Services.AddAuthentication(opt => .AddDiscord(x => { x.AppId = builder.Configuration["Discord:AppId"]; - x.AppSecret = builder.Configuration["Discord:AppSecret"]; + x.AppSecret = File.ReadAllText("discordAppSecret.txt"); x.SaveTokens = true; }); diff --git a/Lieb/appsettings.json b/Lieb/appsettings.json index fa5a6f3..e4c0162 100644 --- a/Lieb/appsettings.json +++ b/Lieb/appsettings.json @@ -6,8 +6,7 @@ } }, "Discord": { - "AppId": "942448872335220806", - "AppSecret": "5tsNxK9LtFpNqxqQnLkSJ1B0HJ7P7YUF" + "AppId": "942448872335220806" }, "AllowedHosts": "*", "ConnectionStrings": {