| 1 |
|
| 2 | import { SessionData, SessionIdStorageStrategy, SessionStorage } from "../sessions.js";
|
| 3 |
|
| 4 | //#region lib/server-runtime/sessions/cookieStorage.d.ts
|
| 5 | interface CookieSessionStorageOptions {
|
| 6 | /**
|
| 7 | * The Cookie used to store the session data on the client, or options used
|
| 8 | * to automatically create one.
|
| 9 | */
|
| 10 | cookie?: SessionIdStorageStrategy["cookie"];
|
| 11 | }
|
| 12 | /**
|
| 13 | * Creates and returns a SessionStorage object that stores all session data
|
| 14 | * directly in the session cookie itself.
|
| 15 | *
|
| 16 | * This has the advantage that no database or other backend services are
|
| 17 | * needed, and can help to simplify some load-balanced scenarios. However, it
|
| 18 | * also has the limitation that serialized session data may not exceed the
|
| 19 | * browser's maximum cookie size. Trade-offs!
|
| 20 | */
|
| 21 | declare function createCookieSessionStorage<Data = SessionData, FlashData = Data>({
|
| 22 | cookie: cookieArg
|
| 23 | }?: CookieSessionStorageOptions): SessionStorage<Data, FlashData>;
|
| 24 | //#endregion
|
| 25 | export { createCookieSessionStorage }; |
| \ | No newline at end of file |