From f5a6041a1c2c00222470ec10fd6345ed8be05009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Szab=C3=B3?= Date: Wed, 12 Mar 2025 15:19:03 +0100 Subject: [PATCH] =?UTF-8?q?Most=20m=C3=A1r=20ki=20is=20tudok=20jelentkezni?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pages/Account/Logout.cshtml | 4 +++ .../Pages/Account/Logout.cshtml.cs | 15 +++++++++++ .../Pages/Shared/_Layout.cshtml | 25 +++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 src/WorkFlowCheck.Web/Pages/Account/Logout.cshtml create mode 100644 src/WorkFlowCheck.Web/Pages/Account/Logout.cshtml.cs 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 @@ + + +