4.2.11 • Published 1 month ago

@shopify/shopify-app-session-storage-redis v4.2.11

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

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.

4.2.7

4 months ago

4.2.6

5 months ago

4.2.9

4 months ago

4.2.8

4 months ago

4.2.3

6 months ago

4.2.10

3 months ago

4.2.2

7 months ago

4.2.11

1 month ago

4.2.5

5 months ago

4.2.4

6 months ago

4.2.1

9 months ago

4.2.0

9 months ago

4.1.0

11 months ago

4.0.1

1 year ago

4.0.0

1 year ago

4.1.2

10 months ago

4.0.3

12 months ago

4.1.1

10 months ago

4.0.2

1 year ago

3.0.5

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.0.4

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.10

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.0-rc.0

3 years ago