@auth0/ai-redis
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Redis Store for Auth0 AI

@auth0/ai-redis is a secure Redis-based data store implementation for the Auth0 AI SDK.

Install

[!WARNING] @auth0/ai-redis is currently under heavy development. We strictly follow Semantic Versioning (SemVer), meaning all breaking changes will only occur in major versions. However, please note that during this early phase, major versions may be released frequently as the API evolves. We recommend locking versions when using this in production.

$ npm install @auth0/ai-redis

Usage

Initialize the Redis store and use it with the Auth0 AI SDK:

import { RedisStore } from "@auth0/ai-redis";
import { Auth0AI } from "@auth0/ai-vercel"; //or ai-langchain, etc.

const auth0AI = new Auth0AI({
  store: new RedisStore({
    encryption: {
      key: "YOUR_ENCRYPTION_KEY",
      alg: "aes-256-cbc",
    },
  }),
});

RedisStore Options

The RedisStore constructor accepts the following options:

  • client: An existing ioredis client instance.
  • encryption (optional): Configuration for encrypting data stored in Redis.
    • key: The encryption key (required if encryption is provided).
    • alg: The encryption algorithm. Supported values are aes-256-cbc, aes-192-cbc, and aes-128-cbc. Defaults to aes-256-cbc.

Alternatively, you can pass a configuration object compatible with ioredis to initialize a new Redis client.

Example with an Existing Redis Client

import { Redis } from "ioredis";
import { RedisStore } from "@auth0/ai-redis";

const redisClient = new Redis();

const store = new RedisStore({
  client: redisClient, //Optional: Default to `new Redis()`
  encryption: {
    key: "YOUR_ENCRYPTION_KEY",
  },
});

Features

  • Encryption: Securely encrypts data before storing it in Redis.
  • Namespace Support: Organize keys using namespaces.
  • Expiration: Supports setting expiration times for stored data.

Feedback

Contributing

We appreciate feedback and contributions to this repo! Before you get started, please see the following:

Raise an issue

To provide feedback or report a bug, please raise an issue on our issue tracker.

Vulnerability Reporting

Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.


Auth0 Logo

Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?

This project is licensed under the Apache 2.0 license. See the LICENSE file for more info.

Readme

Keywords

none

Package Sidebar

Install

npm i @auth0/ai-redis

Weekly Downloads

5

Version

1.0.0

License

Apache-2.0

Unpacked Size

40.2 kB

Total Files

13

Last publish

Collaborators

  • auth0-oss
  • ziluvatar
  • iaco
  • pubalokta
  • auth0npm
  • auth0brokkr
  • hzalaz
  • aaguiarz
  • charlesrea
  • ncluer
  • julien.wollscheid
  • cristiandouce
  • sambego
  • sandrinodimattia
  • lzychowski
  • davidpatrick0
  • sergii.biienko
  • jpadilla
  • jessele
  • rhamzeh_auth0
  • oktajeffoktajeff
  • david.renaud.okta
  • madhuri.rm23
  • npirani_okta
  • soumya.bodavula
  • jamescgarrett-okta
  • stheller
  • jfromaniello
  • edgarchirivella-okta
  • sanjay.manikandhan
  • rithuc23
  • ece-okta
  • enriquepina
  • dougmiller-okta
  • sgarcia-atko
  • roger.chan
  • joshbetz_auth0
  • andriy0k