261102_02_ENH: 공용 인증 쿠키 도메인 적용 조건 수정 및 외부 링크 인증 탭별 분리
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import { cookies } from "next/headers";
|
||||
import { redirect } from "next/navigation";
|
||||
import { AppMainLayout } from "@/components/app-shell/AppMainLayout";
|
||||
import { CookieKeys } from "@/store/cookie/cookie-keys";
|
||||
|
||||
export default async function MainLayout({ children }: Readonly<{ children: React.ReactNode }>) {
|
||||
const cookieStore = await cookies();
|
||||
const accessToken = cookieStore.get(CookieKeys.AuthToken)?.value;
|
||||
if (!accessToken) redirect("/logout");
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
export default function MainLayout({ children }: Readonly<{ children: React.ReactNode }>) {
|
||||
// External JWTs live in this tab, so authentication is checked after hydration.
|
||||
// Every BFF/API request still enforces verified server authentication and scope.
|
||||
return <AppMainLayout>{children}</AppMainLayout>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user