diff --git a/lib/auth/constants.ts b/lib/auth/constants.ts index 82b3e0f..419a7a6 100644 --- a/lib/auth/constants.ts +++ b/lib/auth/constants.ts @@ -29,6 +29,7 @@ export const GetSession = async ({ cookies = '' }) => { 'Content-Type': 'application/json', Cookie: cookies, }, + next: { revalidate: 0 }, }); const session = await response.json(); return session; diff --git a/src/app/api/v1/auth/[...nextauth]/route.ts b/src/app/api/v1/auth/[...nextauth]/route.ts index c725640..dca8648 100644 --- a/src/app/api/v1/auth/[...nextauth]/route.ts +++ b/src/app/api/v1/auth/[...nextauth]/route.ts @@ -1,4 +1,6 @@ // [...nextauth].ts// auth.ts TS-Doc? import { handlers } from '@auth'; +export const fetchCache = 'force-no-store'; +export const revalidate = 0; export const dynamic = 'force-dynamic'; export const { GET, POST } = handlers; diff --git a/src/app/api/v1/user/route.ts b/src/app/api/v1/user/route.ts index ca0a64d..781d433 100644 --- a/src/app/api/v1/user/route.ts +++ b/src/app/api/v1/user/route.ts @@ -19,7 +19,7 @@ const generateErrorResponse = (e: any, status: number) => { }; }; -export const dynamic = 'force-dynamic'; +// export const dynamic = 'force-dynamic'; export async function POST(request: CombineRequest) { const response = { error: generateErrorResponse({ message: 'Code 000/0: Non-identified error.' }, 500) };