20 lines
488 B
C#
20 lines
488 B
C#
using Microsoft.AspNetCore.Authentication;
|
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
namespace RazorPagesMovie.Pages.Admin;
|
|
|
|
public class IndexModel : PageModel
|
|
{
|
|
public void OnGet()
|
|
{
|
|
}
|
|
|
|
public async Task<IActionResult> OnPostLogoutAsync()
|
|
{
|
|
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
|
return RedirectToPage("/Login");
|
|
}
|
|
}
|