Socket
Socket
Sign inDemoInstall

@brightcove/dynamodb-sessionstore

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@brightcove/dynamodb-sessionstore

DynamoDB based session store for use with express-session


Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

DynamoDB Session Store

DynamoDB based session store for use with express-session. This allows sessions to be stored in an existing DynamoDB table and provides flexibilty for tables that contain range/sort keys.

Installation

  1. Make sure you have a .npmrc file with the proper auth token
  2. npm install @brightcove/dynamodb-sessionstore

Usage

const session = require('express-session');
const sessionStore = require('@brightcove/dynamodb-sessionstore');
const DynamoDBStore = sessionStore({ session });
...

app.use(session({
  secret: 'keyboard cat',
  resave: false,
  saveUninitialized: true,
  store: new DynamoDBStore(options),
  ...
}));

Options

ParamTypeDescriptionRequired
database.tablestringTable nameyes
database.clientDynamoDBDocumentInstance of DynamoDBDocument clientyes
getKeyfunctionA function that should accept a session ID and return an object containing the primary key and range/sort key (if necessary) for the session itemno
expiresnumberHow long the default session should last (in milliseconds).By default it's 1 dayno

FAQs

Package last updated on 20 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc