From d1aa5e84059e2a0f837122a75db0f0b2276e53a7 Mon Sep 17 00:00:00 2001 From: fa-sharp <82074176+fa-sharp@users.noreply.github.com> Date: Mon, 12 Jun 2023 03:30:36 -0500 Subject: [PATCH] fix(Session): fix cookie not deleted in stateless session (closes #27) --- src/session/Session.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/session/Session.ts b/src/session/Session.ts index 3ef92f0..d63d2ce 100644 --- a/src/session/Session.ts +++ b/src/session/Session.ts @@ -192,13 +192,13 @@ export class Session { } /** - * Delete the session. Only applicable for stateful sessions. + * Delete the session. */ async destroy(): Promise { + this.deleted = true; if (Session.#sessionCrypto.stateless) { return; } - this.deleted = true; // Only relay destroy to the store for existing sessions that have not been saved if (this.created && !this.saved) { return;