Skip to content

Instantly share code, notes, and snippets.

@explorer14
Created May 3, 2018 19:08
Show Gist options
  • Save explorer14/b11589ac6fc2b8d74a9046d1f64ba931 to your computer and use it in GitHub Desktop.
Save explorer14/b11589ac6fc2b8d74a9046d1f64ba931 to your computer and use it in GitHub Desktop.
[Authorize]
[HttpPost]
[ValidateAntiForgeryToken]
public async Task Logout()
{
await HttpContext.SignOutAsync(
CookieAuthenticationDefaults.AuthenticationScheme);
return RedirectToAction(nameof(HomeController.Index), "Home");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment