using System; using System.Collections.Generic; using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Oqtane.Models; namespace Oqtane.Pages { [IgnoreAntiforgeryToken(Order = 1001)] [AllowAnonymous] public class LogoutModel : PageModel { public async Task OnPostAsync() { await HttpContext.SignOutAsync(IdentityConstants.ApplicationScheme); return LocalRedirect(Url.Content("~/")); } } }