mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-03 15:43:45 +00:00
Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Dax Raad <d@ironbay.co>
25 lines
409 B
TypeScript
25 lines
409 B
TypeScript
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,
|
|
},
|
|
})
|
|
}
|