update token refresh function
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { Suspense } from 'react';
|
||||
import PageTitle from '@/app/ui/page-title';
|
||||
import ReferralStats from '@/app/ui/referral-page/referral-stats';
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations('Global');
|
||||
@@ -9,6 +10,7 @@ export default function Page() {
|
||||
<Suspense fallback={<>...</>}>
|
||||
<PageTitle title="refferal-program">
|
||||
</PageTitle>
|
||||
<ReferralStats />
|
||||
<div>
|
||||
refferals
|
||||
</div>
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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='
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
export default function ReferralStats() {
|
||||
return (
|
||||
<div>
|
||||
test
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user