19 lines
504 B
C#
19 lines
504 B
C#
using Microsoft.AspNetCore.Authentication;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using TaxBaik.Web.Services;
|
|
|
|
namespace TaxBaik.Web.Pages.Admin;
|
|
|
|
[Authorize(AuthenticationSchemes = AdminAuthDefaults.Scheme)]
|
|
public class LogoutModel : PageModel
|
|
{
|
|
public async Task<IActionResult> OnGetAsync()
|
|
{
|
|
await HttpContext.SignOutAsync(AdminAuthDefaults.Scheme);
|
|
return RedirectToPage("/Admin/Login");
|
|
}
|
|
}
|
|
|