Skip to content

Commit

Permalink
Try 1 of fixing OAuth in prod:
Browse files Browse the repository at this point in the history
I am hopeful.
  • Loading branch information
Simyon264 committed May 11, 2024
1 parent 4ffe224 commit b1ee042
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Client/Controllers/Account.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,26 @@ 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"]
});
}

[Route("logout")]
public async Task<IActionResult> Logout()
{
await HttpContext.SignOutAsync("Cookies");
return Redirect("/");
return Redirect(_configuration["RedirectUri"]);
}
}

0 comments on commit b1ee042

Please sign in to comment.