From c23027d6e0051a28119835764eff24c47438fe08 Mon Sep 17 00:00:00 2001 From: adrien2p Date: Fri, 4 Nov 2022 17:40:44 +0100 Subject: [PATCH] fix: logout --- packages/medusa-plugin-auth/src/api/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/medusa-plugin-auth/src/api/index.ts b/packages/medusa-plugin-auth/src/api/index.ts index d0403e9..c200eaa 100644 --- a/packages/medusa-plugin-auth/src/api/index.ts +++ b/packages/medusa-plugin-auth/src/api/index.ts @@ -41,8 +41,8 @@ function getLogoutRouter(configModule: ConfigModule): Router { const logoutHandler = async (req, res) => { if (req.session) { - req.session.destroy() req.session.jwt = {} + req.session.destroy() } res.clearCookie(AUTH_TOKEN_COOKIE_NAME);