Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/shopify-app-session-storage-redis

Package Overview
Dependencies
Maintainers
0
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/shopify-app-session-storage-redis

Shopify App Session Storage for Redis

  • 4.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.4K
increased by28.36%
Maintainers
0
Weekly downloads
 
Created
Source

Session Storage Adapter for Redis

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

You can create an instance of RedisSessionStorage in several ways:

Using a connection URL

import {shopifyApp} from '@shopify/shopify-app-express';
import {RedisSessionStorage} from '@shopify/shopify-app-session-storage-redis';

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

Using a URL object

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

Using credential components

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

Using a RedisClient instance

[!NOTE] Remember that RedisSessionStorage will connect to the database, but won't disconnect from it. If you need to restart the connection, you'll need to manually connect again for the storage to continue working.

import {RedisClientOptions, createClient} from 'redis';
const client = createClient({url: 'redis://username:password@host/database'});

const shopify = shopifyApp({
  sessionStorage: new RedisSessionStorage(client),
  // ...
});

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.

Keywords

FAQs

Package last updated on 29 Oct 2024

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