Skip to main content
Version: 57.2.0

withCookieJarRepair

withCookieJarRepair(__namedParameters): StorageAdapter

Wraps a storage adapter so reads of the Better Auth cookie jar are repaired first. Only the jar key is touched, because the plugin stores unrelated shapes under its other keys (the cached session payload holds plain strings and numbers, which repairCookieJar would strip).

Parameters

__namedParameters

cookieJarKey

string

storage

StorageAdapter

Returns

StorageAdapter