Aktivierter Logout-Endpunkt

This commit is contained in:
Developer 02 2025-03-25 14:00:19 +01:00
parent d228a3cd50
commit 5c097eda80

View File

@ -23,5 +23,13 @@ public class PlaceholderAuthController : ControllerBase
[Authorize]
[HttpPost("logout")]
public Task<IActionResult> Logout() => throw new NotImplementedException();
public IActionResult Logout()
{
Response.Cookies.Delete("AuthToken", new()
{
Path = "/"
});
return Ok();
}
}