Files
PetriePanel/Web/Pages/Logout.cshtml.cs
2021-10-13 20:39:11 -04:00

16 lines
369 B
C#

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<IActionResult> OnGet()
{
await HttpContext.SignOutAsync();
return Redirect("/");
}
}
}