Aktivierter Logout-Endpunkt
This commit is contained in:
parent
d228a3cd50
commit
5c097eda80
@ -23,5 +23,13 @@ public class PlaceholderAuthController : ControllerBase
|
|||||||
|
|
||||||
[Authorize]
|
[Authorize]
|
||||||
[HttpPost("logout")]
|
[HttpPost("logout")]
|
||||||
public Task<IActionResult> Logout() => throw new NotImplementedException();
|
public IActionResult Logout()
|
||||||
|
{
|
||||||
|
Response.Cookies.Delete("AuthToken", new()
|
||||||
|
{
|
||||||
|
Path = "/"
|
||||||
|
});
|
||||||
|
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user