added logout button.

This commit is contained in:
ivancheahhh
2024-01-04 16:51:45 -07:00
parent 83470a9a6c
commit e856e9d6ba
3 changed files with 25 additions and 1 deletions

View File

@@ -121,6 +121,13 @@ namespace CarCareTracker.Controllers
}
return Json(false);
}
[Authorize]
[HttpPost]
public IActionResult LogOut()
{
Response.Cookies.Delete("ACCESS_TOKEN");
return Json(true);
}
private static string Sha256_hash(string value)
{
StringBuilder Sb = new StringBuilder();