mirror of
https://github.com/miawinter98/just-short-it.git
synced 2024-09-20 09:48:59 +00:00
13 lines
429 B
C#
13 lines
429 B
C#
using Microsoft.AspNetCore.Authentication;
|
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
|
|
namespace JustShortIt.Pages;
|
|
|
|
public class LogoutModel : PageModel {
|
|
public async Task<IActionResult> OnGetAsync() {
|
|
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
|
return RedirectToPage("Index");
|
|
}
|
|
} |