mod: cleanup auth
Some checks failed
Deploy API / docker (17, 3.8.5) (push) Failing after 35s
Release Mod / Build (push) Successful in 30s

This commit is contained in:
Lee
2024-08-15 18:22:16 +01:00
parent d888ab1eb5
commit 7b560075ba
6 changed files with 44 additions and 79 deletions

View File

@ -35,11 +35,10 @@ namespace ScoreTracker.API
{
if (checkAuth)
{
var authHelper = new AuthHelper();
await authHelper.EnsureLoggedIn();
if (!authHelper.IsLoggedIn)
var signinResponse = await Authentication.ValidateAndSignIn();
if (!signinResponse.Success)
{
throw new Exception($"Failed to log in: {authHelper.FailReason}");
throw new Exception($"Failed to log in: {signinResponse.Response}");
}
}
var jsonString = JsonConvert.SerializeObject(json, Formatting.None);