using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; namespace Web.Pages { public class Logout : PageModel { public async Task OnGet() { await HttpContext.SignOutAsync(); return Redirect("/"); } } }