auth.session.ts 368 B

1234567891011121314151617181920212223
  1. import { useSession } from "vinxi/http"
  2. export interface AuthSession {
  3. account?: Record<
  4. string,
  5. {
  6. id: string
  7. email: string
  8. }
  9. >
  10. current?: string
  11. }
  12. export function useAuthSession() {
  13. return useSession<AuthSession>({
  14. password: "0".repeat(32),
  15. name: "auth",
  16. cookie: {
  17. secure: false,
  18. httpOnly: true,
  19. },
  20. })
  21. }