[GH-ISSUE #8752] [Docs] redis-storage package has missing documentation #19812

Open
opened 2026-04-15 19:09:58 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @lime517 on GitHub (Mar 23, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/8752

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Visit @better-auth/redis-storage's NPM package or readme.md, and observe that the description contains the following link, https://better-auth.com/docs/storage, which 404's.

Current vs. Expected behavior

Current behavior:

  • The link https://better-auth.com/docs/storage 404's

Expected behavior:
One of

  1. https://better-auth.com/docs/storage resolving
  2. The readme pointing somewhere valid.

What version of Better Auth are you using?

1.5.6

System info

n/a - docs issue

Which area(s) are affected? (Select all that apply)

Documentation

Auth config (if applicable)


Additional context

I'm not sure why that page has been removed, but as someone interesting in how Better Auth can integrate with Redis for session storage, I'd sure love to see those docs.\

Originally created by @lime517 on GitHub (Mar 23, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/8752 ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce Visit @better-auth/redis-storage's [NPM package](https://www.npmjs.com/package/@better-auth/redis-storage?activeTab=readme) or [readme.md](https://github.com/better-auth/better-auth/tree/main/packages/redis-storage), and observe that the description contains the following link, [https://better-auth.com/docs/storage](https://better-auth.com/docs/storage), which 404's. ### Current vs. Expected behavior Current behavior: * The link `https://better-auth.com/docs/storage` 404's Expected behavior: One of 1. https://better-auth.com/docs/storage resolving 2. The readme pointing somewhere valid. ### What version of Better Auth are you using? 1.5.6 ### System info ```bash n/a - docs issue ``` ### Which area(s) are affected? (Select all that apply) Documentation ### Auth config (if applicable) ```typescript ``` ### Additional context I'm not sure why that page has been removed, but as someone interesting in how Better Auth can integrate with Redis for session storage, I'd sure love to see those docs.\
GiteaMirror added the docsdatabase labels 2026-04-15 19:09:58 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Mar 23, 2026):

Hi @lime517! I'm Dosu and I’m helping the better-auth team.

You're right that /docs/storage returns a 404. The storage documentation doesn't exist as a standalone page — it's spread across multiple pages:

In the meantime, here's how to use the @better-auth/redis-storage package:

import { Redis } from "ioredis";
import { redisStorage } from "@better-auth/redis-storage";

const redis = new Redis({
  host: "localhost",
  port: 6379,
});

const auth = betterAuth({
  secondaryStorage: redisStorage({ client: redis }),
});

The redisStorage function accepts client (required ioredis instance) and keyPrefix (optional, defaults to "better-auth:"). Once configured, you can use it for rate limiting by setting rateLimit.storage: "secondary-storage".

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

<!-- gh-comment-id:4114335903 --> @dosubot[bot] commented on GitHub (Mar 23, 2026): <!-- Greeting --> Hi @lime517! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the better-auth team. <!-- Answer --> You're right that `/docs/storage` returns a 404. The storage documentation doesn't exist as a standalone page — it's spread across multiple pages: - [**Session Management**](https://better-auth.com/docs/concepts/session-management) - covers session caching with Redis - [**Rate Limiting**](https://better-auth.com/docs/concepts/rate-limit) - explains using Redis for rate limiting storage - [**Options Reference**](https://better-auth.com/docs/reference/options) - documents the `secondaryStorage` configuration In the meantime, here's how to use the `@better-auth/redis-storage` package: ```typescript import { Redis } from "ioredis"; import { redisStorage } from "@better-auth/redis-storage"; const redis = new Redis({ host: "localhost", port: 6379, }); const auth = betterAuth({ secondaryStorage: redisStorage({ client: redis }), }); ``` The `redisStorage` function accepts `client` (required ioredis instance) and `keyPrefix` (optional, defaults to `"better-auth:"`). Once configured, you can use it for [rate limiting](https://better-auth.com/docs/concepts/rate-limit) by setting `rateLimit.storage: "secondary-storage"`. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/63f13bab-e09b-4445-a636-a049c96ee229?feedback_type=great_response&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/63f13bab-e09b-4445-a636-a049c96ee229?feedback_type=irrelevant_answer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/63f13bab-e09b-4445-a636-a049c96ee229?feedback_type=incorrect_sources&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/63f13bab-e09b-4445-a636-a049c96ee229?feedback_type=too_verbose&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/63f13bab-e09b-4445-a636-a049c96ee229?feedback_type=hallucination&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/63f13bab-e09b-4445-a636-a049c96ee229?feedback_type=bug_report&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report) | [Other](https://app.dosu.dev/response-feedback/63f13bab-e09b-4445-a636-a049c96ee229?feedback_type=other&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/cdda13d9-dd27-4d31-b09a-5d8bec92de21/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=You%27re%20right%20that%20%60/docs/storage%60%20returns%20a%20404.%20The%20storage%20documentation%20doesn%27t%20exist%20as%20a%20standalone%20page%20%E2%80%94%20it%27s%20spread%20across%20multiple%20pages%3A%0A%0A-%20%5B%2A%2ASession%20Management%2A%2A%5D%28https%3A//better-auth.com/docs/concepts/session-management%29%20-%20covers%20session%20caching%20with%20Redis%0A-%20%5B%2A%2ARate%20Limiting%2A%2A%5D%28https%3A//better-auth.com/docs/concepts/rate-limit%29%20-%20explains%20using%20Redis%20for%20rate%20limiting%20storage%0A-%20%5B%2A%2AOptions%20Reference%2A%2A%5D%28https%3A//better-auth.com/docs/reference/options%29%20-%20documents%20the%20%60secondaryStorage%60%20configuration%0A%0AIn%20the%20meantime%2C%20here%27s%20how%20to%20use%20the%20%60%40better-auth/redis-storage%60%20package%3A%0A%0A%60%60%60typescript%0Aimport%20%7B%20Redis%20%7D%20from%20%22ioredis%22%3B%0Aimport%20%7B%20redisStorage%20%7D%20from%20%22%40better-auth/redis-storage%22%3B%0A%0Aconst%20redis%20%3D%20new%20Redis%28%7B%0A%20%20host%3A%20%22localhost%22%2C%0A%20%20port%3A%206379%2C%0A%7D%29%3B%0A%0Aconst%20auth%20%3D%20betterAuth%28%7B%0A%20%20secondaryStorage%3A%20redisStorage%28%7B%20client%3A%20redis%20%7D%29%2C%0A%7D%29%3B%0A%60%60%60%0A%0AThe%20%60redisStorage%60%20function%20accepts%20%60client%60%20%28required%20ioredis%20instance%29%20and%20%60keyPrefix%60%20%28optional%2C%20defaults%20to%20%60%22better-auth%3A%22%60%29.%20Once%20configured%2C%20you%20can%20use%20it%20for%20%5Brate%20limiting%5D%28https%3A//better-auth.com/docs/concepts/rate-limit%29%20by%20setting%20%60rateLimit.storage%3A%20%22secondary-storage%22%60.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=join-discord)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/better-auth/better-auth/issues/8752)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#19812