diff --git a/OliverBooth/Services/ISessionService.cs b/OliverBooth/Services/ISessionService.cs
index e40d56d..99bce13 100644
--- a/OliverBooth/Services/ISessionService.cs
+++ b/OliverBooth/Services/ISessionService.cs
@@ -27,6 +27,13 @@ public interface ISessionService
/// is .
void DeleteSession(ISession session);
+ ///
+ /// Deletes the client's session cookie.
+ ///
+ /// The response to edit.
+ /// is .
+ IActionResult DeleteSessionCookie(HttpResponse response);
+
///
/// Saves a session cookie to the client's browser.
///
diff --git a/OliverBooth/Services/SessionService.cs b/OliverBooth/Services/SessionService.cs
index c298972..b726af4 100644
--- a/OliverBooth/Services/SessionService.cs
+++ b/OliverBooth/Services/SessionService.cs
@@ -70,6 +70,13 @@ internal sealed class SessionService : BackgroundService, ISessionService
context.SaveChanges();
}
+ ///
+ public IActionResult DeleteSessionCookie(HttpResponse response)
+ {
+ response.Cookies.Delete("sid");
+ return new RedirectToPageResult("/Admin/Login");
+ }
+
///
public void SaveSessionCookie(HttpResponse response, ISession session)
{