Skip to content

cookieStorage

Function to create cookie based Storage

Import

import { cookieStorage } from "@account-kit/core";

Parameters

config

{sessionLength: number; domain?: string} optional config object

config.sessionLength

number the duration until the cookie expires in milliseconds (deprecated)

config.domain

string optional domain to set the cookie on, eg: example.com if you want the cookie to work on all subdomains of example.com

Returns

Storage an instance of a browser storage object that leverages cookies