@shopify/shopify-app-session-storage-mongodb
TypeScript icon, indicating that this package has built-in type declarations

4.0.20 • Public • Published

Session Storage Adapter for MongoDB

This package implements the SessionStorage interface that works with an instance of MongoDB.

import {shopifyApp} from '@shopify/shopify-app-express';
import {MongoDBSessionStorage} from '@shopify/shopify-app-session-storage-mongodb';

const shopify = shopifyApp({
  sessionStorage: new MongoDBSessionStorage(
    'mongodb://username:password@host/',
    'database',
  ),
  // ...
});

// OR

const shopify = shopifyApp({
  sessionStorage: MongoDBSessionStorage.withCredentials(
    'host.com',
    'thedatabase',
    'username',
    'password',
  ),
  // ...
});

If you prefer to use your own implementation of a session storage mechanism that is compatible with the @shopify/shopify-app-express package, see the implementing session storage guide.

Package Sidebar

Install

npm i @shopify/shopify-app-session-storage-mongodb

Weekly Downloads

2,392

Version

4.0.20

License

MIT

Unpacked Size

74.2 kB

Total Files

10

Last publish

Collaborators

  • shopify-admin
  • shopify-dep
  • mishsmelle
  • netlohan
  • pmoloney89
  • maryharte
  • jaykay101