From b1ee04235199f9a50b8ec034e63fcd3f911b58b0 Mon Sep 17 00:00:00 2001 From: Simon <63975668+Simyon264@users.noreply.github.com> Date: Sat, 11 May 2024 22:48:23 +0200 Subject: [PATCH] Try 1 of fixing OAuth in prod: I am hopeful. --- Client/Controllers/Account.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Client/Controllers/Account.cs b/Client/Controllers/Account.cs index a9103d0..17a3605 100644 --- a/Client/Controllers/Account.cs +++ b/Client/Controllers/Account.cs @@ -7,12 +7,19 @@ namespace Client.Controllers; [Route("/account/")] public class Account : Controller { + private readonly IConfiguration _configuration; + + public Account(IConfiguration configuration) + { + _configuration = configuration; + } + [Route("login")] public IActionResult Login() { return Challenge(new AuthenticationProperties { - RedirectUri = "/" + RedirectUri = _configuration["RedirectUri"] }); } @@ -20,6 +27,6 @@ public IActionResult Login() public async Task Logout() { await HttpContext.SignOutAsync("Cookies"); - return Redirect("/"); + return Redirect(_configuration["RedirectUri"]); } } \ No newline at end of file