using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; namespace Oqtane.Pages { [AllowAnonymous] public class LogoutModel : PageModel { public async Task OnPostAsync(string returnurl) { await HttpContext.SignOutAsync(IdentityConstants.ApplicationScheme); return LocalRedirect(Url.Content("~" + returnurl)); } } }