AbstractSessionStore | @auth0/nextjs-auth0 - v4.3.0
Description: Documentation for @auth0/nextjs-auth0

# Class AbstractSessionStore`Abstract`

- Defined in src/server/session/abstract-session-store.ts:72

#####
Index

### Constructors

constructor

### Properties

cookieConfig
secret
sessionCookieName
store?

### Methods

calculateMaxAge
delete
epoch
get
set

##
Constructors

### constructor

- new AbstractSessionStore(
  __namedParameters: SessionStoreOptions,
  ): AbstractSessionStore

  #### Parameters

  - __namedParameters: SessionStoreOptions

  #### Returns AbstractSessionStore

  - Defined in src/server/session/abstract-session-store.ts:84

##
Properties

### cookieConfig

cookieConfig: CookieOptions

- Defined in src/server/session/abstract-session-store.ts:82

### secret

secret: string

- Defined in src/server/session/abstract-session-store.ts:73

### sessionCookieName

sessionCookieName: string

- Defined in src/server/session/abstract-session-store.ts:74

### `Optional`store

store?: SessionDataStore

- Defined in src/server/session/abstract-session-store.ts:80

##
Methods

### calculateMaxAge

- calculateMaxAge(createdAt: number): number

  calculateMaxAge calculates the max age of the session based on createdAt and the rolling and absolute durations.

  #### Parameters

  - createdAt: number

  #### Returns number

  - Defined in src/server/session/abstract-session-store.ts:140

### `Abstract`delete

- delete(
  reqCookies: RequestCookies | ReadonlyRequestCookies,
  resCookies: ResponseCookies,
  ): Promise<void>

  #### Parameters

  - reqCookies: RequestCookies | ReadonlyRequestCookies
  - resCookies: ResponseCookies

  #### Returns Promise<void>

  - Defined in src/server/session/abstract-session-store.ts:125

### epoch

- epoch(): number

  epoch returns the time since unix epoch in seconds.

  #### Returns number

  - Defined in src/server/session/abstract-session-store.ts:133

### `Abstract`get

- get(
  reqCookies: RequestCookies | ReadonlyRequestCookies,
  ): Promise<null | SessionData>

  #### Parameters

  - reqCookies: RequestCookies | ReadonlyRequestCookies

  #### Returns Promise<null | SessionData>

  - Defined in src/server/session/abstract-session-store.ts:110

### `Abstract`set

- set(
  reqCookies: RequestCookies | ReadonlyRequestCookies,
  resCookies: ResponseCookies,
  session: SessionData,
  isNew?: boolean,
  ): Promise<void>

  save adds the encrypted session cookie as a `Set-Cookie` header. If the `iat` property is present on the session, then it will be used to compute the `maxAge` cookie value.

  #### Parameters

  - reqCookies: RequestCookies | ReadonlyRequestCookies
  - resCookies: ResponseCookies
  - session: SessionData
  - `Optional`isNew: boolean

  #### Returns Promise<void>

  - Defined in src/server/session/abstract-session-store.ts:118