From 589405513403b4d9b8c1918e4fd9b13df3d97da2 Mon Sep 17 00:00:00 2001 From: pilcrowOnPaper Date: Mon, 14 Oct 2024 21:56:42 +0900 Subject: [PATCH] fix redis guide --- pages/sessions/basic-api/redis.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pages/sessions/basic-api/redis.md b/pages/sessions/basic-api/redis.md index 4736ac8..9fefe89 100644 --- a/pages/sessions/basic-api/redis.md +++ b/pages/sessions/basic-api/redis.md @@ -101,8 +101,6 @@ Sessions are validated in 2 steps: We'll also extend the session expiration when it's close to expiration. This ensures active sessions are persisted, while inactive ones will eventually expire. We'll handle this by checking if there's less than 15 days (half of the 30 day expiration) before expiration. -For convenience, we'll return both the session and user object tied to the session ID. - ```ts import { redis } from "./redis.js"; import { encodeBase32LowerCaseNoPadding, encodeHexLowerCase } from "@oslojs/encoding"; @@ -252,7 +250,7 @@ import { validateSessionToken } from "./session.js"; const token = cookies.get("session"); if (token !== null) { - const { session, user } = validateSessionToken(token); + const session = validateSessionToken(token); } ```