16 lines
369 B
C#
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("/");
|
|
}
|
|
}
|
|
} |