0
I’m trying to call this method asynchronous in the view but I can’t.
private async Task LogOff()
{
   RedirectToAction("Index", "Home");
   await HttpContext.SignOutAsync();
}
This is one of the ways I’m trying to call.
<script>
    $(".sair").click(function () {
        $.get("../Login/LogOff", function(data, status) {
             alert("Data: " + data + "\nStatus: " + status);
             });
        });
</script>
The other way I tried to call but it didn’t work.
<a class="nav-link text-dark sair" asp-area="" asp-controller="Login" asp-action="LogOff">Sair</a>
						
Why can’t you do it?
– CypherPotato