Jay V 5 miesięcy temu
rodzic
commit
3de1ce467f
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4 3
      cloud/app/src/context/auth.tsx

+ 4 - 3
cloud/app/src/context/auth.tsx

@@ -21,11 +21,8 @@ export const getActor = query(async (): Promise<Actor.Info> => {
   const url = new URL(evt!.request.headers.get("referer") ?? evt!.request.url)
   const url = new URL(evt!.request.headers.get("referer") ?? evt!.request.url)
   const auth = await useAuthSession()
   const auth = await useAuthSession()
   const [workspaceHint] = url.pathname.split("/").filter((x) => x.length > 0)
   const [workspaceHint] = url.pathname.split("/").filter((x) => x.length > 0)
-  console.log("here1")
   if (!workspaceHint) {
   if (!workspaceHint) {
-    console.log("here2")
     if (auth.data.current) {
     if (auth.data.current) {
-      console.log("here3")
       const current = auth.data.account[auth.data.current]
       const current = auth.data.account[auth.data.current]
       return {
       return {
         type: "account",
         type: "account",
@@ -102,6 +99,10 @@ export function useAuthSession() {
   return useSession<AuthSession>({
   return useSession<AuthSession>({
     password: "0".repeat(32),
     password: "0".repeat(32),
     name: "auth",
     name: "auth",
+    cookie: {
+      secure: false,
+      httpOnly: true,
+    },
   })
   })
 }
 }