diff --git a/src/WorkFlowCheck.Web/Pages/Account/Logout.cshtml b/src/WorkFlowCheck.Web/Pages/Account/Logout.cshtml new file mode 100644 index 0000000..92fd99e --- /dev/null +++ b/src/WorkFlowCheck.Web/Pages/Account/Logout.cshtml @@ -0,0 +1,4 @@ +@page +@model WorkFlowCheck.Web.Pages.Account.LogoutModel +@{ +} diff --git a/src/WorkFlowCheck.Web/Pages/Account/Logout.cshtml.cs b/src/WorkFlowCheck.Web/Pages/Account/Logout.cshtml.cs new file mode 100644 index 0000000..be696d2 --- /dev/null +++ b/src/WorkFlowCheck.Web/Pages/Account/Logout.cshtml.cs @@ -0,0 +1,15 @@ +using Microsoft.AspNetCore.Authentication; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.RazorPages; + +namespace WorkFlowCheck.Web.Pages.Account +{ + public class LogoutModel : PageModel + { + public IActionResult OnGet() + { + Response.Cookies.Delete("AuthToken"); + return RedirectToPage("/Account/Login"); + } + } +} diff --git a/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml b/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml index f6590cb..224ec4d 100644 --- a/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml +++ b/src/WorkFlowCheck.Web/Pages/Shared/_Layout.cshtml @@ -37,6 +37,11 @@ Privacy +
@@ -47,6 +52,26 @@ + + +