UNPKG

better-auth

Version:

The most comprehensive authentication framework for TypeScript.

14 lines (13 loc) 634 B
import { defineRequestState } from "@better-auth/core/context"; //#region src/api/state/should-session-refresh.ts /** * State for skipping session refresh * * In some cases, such as when using server-side rendering (SSR) or when dealing with * certain types of requests, it may be necessary to skip session refresh to prevent * potential inconsistencies between the session data in the database and the session * data stored in cookies. */ const { get: getShouldSkipSessionRefresh, set: setShouldSkipSessionRefresh } = defineRequestState(() => false); //#endregion export { getShouldSkipSessionRefresh, setShouldSkipSessionRefresh };