diff --git a/src/auth/auth.service.ts b/src/auth/auth.service.ts index 75fe1a0..7bbf27f 100644 --- a/src/auth/auth.service.ts +++ b/src/auth/auth.service.ts @@ -29,7 +29,10 @@ export async function getSession( if (session === null) return null; const user = await userModel.findById(session.user); - if (user === null) return null; + if (user === null) { + await deleteSession(sessionId); + return null; + } return { sid: session.id,