@shopify/shopify-app-session-storage-mongodb
v5.0.5
Published
Shopify App Session Storage for MongoDB
Downloads
11,730
Readme
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 uses the SessionStorage interface, see the implementing session storage guide.
