mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-22 16:06:50 +00:00
fix: resolve make dev and test-e2e errors (#2570)
This commit is contained in:
@@ -10,6 +10,18 @@ const SSR_AUTH_TIMEOUT_MS = 5_000;
|
||||
* Returns a tagged AuthResult — callers use exhaustive switch, no try/catch.
|
||||
*/
|
||||
export async function getServerSideUser(): Promise<AuthResult> {
|
||||
if (process.env.DEER_FLOW_AUTH_DISABLED === "1") {
|
||||
return {
|
||||
tag: "authenticated",
|
||||
user: {
|
||||
id: "e2e-user",
|
||||
email: "e2e@test.local",
|
||||
system_role: "admin",
|
||||
needs_setup: false,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
const cookieStore = await cookies();
|
||||
const sessionCookie = cookieStore.get("access_token");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user