diff options
| author | Dax Raad <[email protected]> | 2026-01-12 22:33:57 -0500 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2026-01-12 22:33:57 -0500 |
| commit | eaa76dad0cd7be52a969ceaa2a6baa338cc9929d (patch) | |
| tree | 801bcf930ddd967a1c4a0f4f1ad8fbce2bd8b271 /packages/console/app/src/context | |
| parent | 66f9bdab32b21110c0dd9ce0aaa8d928aea8eba2 (diff) | |
| download | opencode-eaa76dad0cd7be52a969ceaa2a6baa338cc9929d.tar.gz opencode-eaa76dad0cd7be52a969ceaa2a6baa338cc9929d.zip | |
get rid of extra file
Diffstat (limited to 'packages/console/app/src/context')
| -rw-r--r-- | packages/console/app/src/context/auth.session.ts | 24 | ||||
| -rw-r--r-- | packages/console/app/src/context/auth.ts | 27 |
2 files changed, 26 insertions, 25 deletions
diff --git a/packages/console/app/src/context/auth.session.ts b/packages/console/app/src/context/auth.session.ts index 726b6c834..e69de29bb 100644 --- a/packages/console/app/src/context/auth.session.ts +++ b/packages/console/app/src/context/auth.session.ts @@ -1,24 +0,0 @@ -import { useSession } from "@solidjs/start/http" - -export interface AuthSession { - account?: Record< - string, - { - id: string - email: string - } - > - current?: string -} - -export function useAuthSession() { - return useSession<AuthSession>({ - password: "0".repeat(32), - name: "auth", - maxAge: 60 * 60 * 24 * 365, - cookie: { - secure: false, - httpOnly: true, - }, - }) -} diff --git a/packages/console/app/src/context/auth.ts b/packages/console/app/src/context/auth.ts index dbbd3c3b2..aed07a630 100644 --- a/packages/console/app/src/context/auth.ts +++ b/packages/console/app/src/context/auth.ts @@ -5,13 +5,38 @@ import { redirect } from "@solidjs/router" import { Actor } from "@opencode-ai/console-core/actor.js" import { createClient } from "@openauthjs/openauth/client" -import { useAuthSession } from "./auth.session" export const AuthClient = createClient({ clientID: "app", issuer: import.meta.env.VITE_AUTH_URL, }) +import { useSession } from "@solidjs/start/http" +import { Resource } from "@opencode-ai/console-resource" + +export interface AuthSession { + account?: Record< + string, + { + id: string + email: string + } + > + current?: string +} + +export function useAuthSession() { + return useSession<AuthSession>({ + password: Resource.ZEN_SESSION_SECRET.value, + name: "auth", + maxAge: 60 * 60 * 24 * 365, + cookie: { + secure: false, + httpOnly: true, + }, + }) +} + export const getActor = async (workspace?: string): Promise<Actor.Info> => { "use server" const evt = getRequestEvent() |
