mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-22 18:24:21 +01:00
24 lines
367 B
TypeScript
24 lines
367 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",
|
|
cookie: {
|
|
secure: false,
|
|
httpOnly: true,
|
|
},
|
|
})
|
|
}
|