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

remix-redis-session

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remix-redis-session

Redis session storage for Remix

  • 0.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.8K
decreased by-10.04%
Maintainers
1
Weekly downloads
 
Created
Source

remix-redis-session

A simple library to use redis as your session backing store in your remix project

Install

npm install remix-redis-session or yarn add remix-redis-session

Api

createRedisSessionStorage({
    cookie: SessionIdStorageStrategy["cookie"]
    options: {
        redisConfig?: Redis.RedisOptions,
        redisClient?: Redis.Redis
    }
})

Examples

// With redisConfig
export const sessionStorage = createRedisSessionStorage({
    cookie: {
        name: "example",
        secure: true,
        sameSite: "lax",
        secrets: ["s3cr3t"],
        path: "/",
        httpOnly: true,
    },
    options: {
        redisConfig: {
            port: 6379,
            family: 6,
            host: process.env.REDIS_HOST,
            password: process.env.REDIS_PASSWORD ?? undefined,
        }
    }
});

// With redisClient
const redis = new Redis({
    port: 6379,
    family: 6,
    host: process.env.REDIS_HOST,
    password: process.env.REDIS_PASSWORD ?? undefined,
});

export const sessionStorage = createRedisSessionStorage({
    cookie: {
        name: "example",
        secure: true,
        sameSite: "lax",
        secrets: ["s3cr3t"],
        path: "/",
        httpOnly: true,
    },
    options: {
        redisClient: redis
    }
});

Buy me a coffee :)

:heart: Sponsor

FAQs

Package last updated on 15 Nov 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