Files
opencode/packages/console/app/src/context/auth.session.ts
2025-09-27 01:12:25 -04:00

25 lines
400 B
TypeScript

import { useSession } from "vinxi/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,
},
})
}