Skip to content

Instantly share code, notes, and snippets.

@marcosdeaguiar
Last active May 20, 2020 18:18
Show Gist options
  • Save marcosdeaguiar/347bf41f368487cccdf5e851d2cd22ad to your computer and use it in GitHub Desktop.
Save marcosdeaguiar/347bf41f368487cccdf5e851d2cd22ad to your computer and use it in GitHub Desktop.
[HttpGet]
[Route("logout")]
public IActionResult Logout()
{
HttpContext.User = new ClaimsPrincipal();
RefreshCSRFToken();
HttpContext.Response.Cookies.Delete("jwt");
return Ok();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment