From d6be61cdcf2a01032dd26970a8107a479472c77e Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar <30073382+mighty840@users.noreply.github.com> Date: Thu, 16 Apr 2026 22:09:12 +0200 Subject: [PATCH] fix(pitch-deck): align JWT expiry with session lifetime (24h) JWT was set to 1h while the session cookie lived 24h. After 1 hour the cookie persisted but jwtVerify failed, making /api/auth/me return 401 and the re-click redirect fall through to the already-used token error. Co-Authored-By: Claude Sonnet 4.6 --- pitch-deck/lib/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pitch-deck/lib/auth.ts b/pitch-deck/lib/auth.ts index caf7f63..79e0edb 100644 --- a/pitch-deck/lib/auth.ts +++ b/pitch-deck/lib/auth.ts @@ -4,8 +4,8 @@ import { cookies } from 'next/headers' import pool from './db' const COOKIE_NAME = 'pitch_session' -const JWT_EXPIRY = '1h' const SESSION_EXPIRY_HOURS = 24 +const JWT_EXPIRY = `${SESSION_EXPIRY_HOURS}h` function getJwtSecret() { const secret = process.env.PITCH_JWT_SECRET