UNPKG

supakit

Version:

A Supabase auth helper for SvelteKit. Relies on browser cookies.

15 lines (14 loc) 410 B
import { merge } from '../utils.js'; const defaults = { path: '/', maxAge: 60 * 60 * 24 * 365 }; let cookie_options; export const getCookieOptions = () => { return cookie_options ?? defaults; }; export const setCookieOptions = (value) => { if (typeof value !== 'object') throw new Error('Cookie options must be an object'); cookie_options = merge(defaults, value); };