update token refresh function

This commit is contained in:
smanylov
2026-01-12 15:41:16 +07:00
parent 9ac254aa40
commit 77ca4775b1
4 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -301,7 +301,7 @@ export async function tokenLifeExtension() {
const parsed = await response.json();
console.log('tokenLifeExtension');
console.log(parsed.message_code);
updateSession();
await updateSession();
}
} catch (error) {
await deleteSession();
+3 -2
View File
@@ -1,7 +1,8 @@
import 'server-only'
'use server';
/* import 'server-only'; */
import { cookies } from 'next/headers'
import { SignJWT, jwtVerify } from 'jose'
/* import { SessionPayload } from '@/app/lib/definitions' */
/* const secretKey = process.env.SESSION_SECRET */
const secretKey = 'AAA+sq1yKte/gMgUUu/B/OyXqr45/LMYplPVOlWc+uo='