SessionDataStore | @auth0/nextjs-auth0 - v4.0.1
Description: Documentation for @auth0/nextjs-auth0

# Interface SessionDataStore

interface SessionDataStore {
delete(id: string): Promise<void>;
deleteByLogoutToken(logoutToken: LogoutToken): Promise<void>;
get(id: string): Promise<null | SessionData>;
set(id: string, session: SessionData): Promise<void>;
}

- Defined in src/types/index.ts:29

#####
Index

### Methods

delete
deleteByLogoutToken?
get
set

##
Methods

### delete

- delete(id: string): Promise<void>

  Destroys the session with the given session ID.

  #### Parameters

  - id: string

  #### Returns Promise<void>

  - Defined in src/types/index.ts:43

### `Optional`deleteByLogoutToken

- deleteByLogoutToken(logoutToken: LogoutToken): Promise<void>

  Deletes the session with the given logout token which may contain a session ID or a user ID, or both.

  #### Parameters

  - logoutToken: LogoutToken

  #### Returns Promise<void>

  - Defined in src/types/index.ts:48

### get

- get(id: string): Promise<null | SessionData>

  Gets the session from the store given a session ID.

  #### Parameters

  - id: string

  #### Returns Promise<null | SessionData>

  - Defined in src/types/index.ts:33

### set

- set(id: string, session: SessionData): Promise<void>

  Upsert a session in the store given a session ID and `SessionData`.

  #### Parameters

  - id: string
  - session: SessionData

  #### Returns Promise<void>

  - Defined in src/types/index.ts:38