Skip to content

Commit

Permalink
πŸŽ‰ Make the redis cache fully adapter agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
boul2gom committed Feb 21, 2025
1 parent 7cb73ae commit a9b5827
Show file tree
Hide file tree
Showing 17 changed files with 193 additions and 554 deletions.
2 changes: 1 addition & 1 deletion .github/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# https://github.com/actions/labeler#create-githublabeleryml
adapters: ["packages/core/src/adapters.ts", "packages/adapter-*/**/*"]
core: ["packages/core/src/**/*"]
redis-cache: ["packages/adapter-redis-cache/**/*"]
azure-tables: ["packages/adapter-azure-tables/**/*"]
edgedb: ["packages/adapter-edgedb/**/*"]
d1: ["packages/adapter-d1/**/*"]
Expand All @@ -23,7 +24,6 @@ neon: ["packages/adapter-neon/**/*"]
playgrounds: ["apps/playgrounds/**/*"]
pouchdb: ["packages/adapter-pouchdb/**/*"]
prisma: ["packages/adapter-prisma/**/*"]
redis-prisma: ["packages/adapter-redis-prisma/**/*"]
kysely: ["packages/adapter-kysely/**/*"]
providers: ["packages/core/src/providers/**/*"]
sequelize: ["packages/adapter-sequelize/**/*"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
- "@auth/qwik"
- "@auth/solid-start"
- "@auth/sveltekit"
- "@auth/redis-cache-adapter"
- "@auth/azure-tables-adapter"
- "@auth/d1-adapter"
- "@auth/dgraph-adapter"
Expand All @@ -38,7 +39,6 @@ on:
- "@auth/pg-adapter"
- "@auth/pouchdb-adapter"
- "@auth/prisma-adapter"
- "@auth/redis-prisma-adapter"
- "@auth/sequelize-adapter"
- "@auth/supabase-adapter"
- "@auth/surrealdb-adapter"
Expand Down
Binary file added docs/public/img/adapters/redis-cache.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/public/img/adapters/redis-prisma.png
Binary file not shown.
47 changes: 47 additions & 0 deletions packages/adapter-redis-cache/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<h2 align="center">πŸ“¦ Enhanced caching adapter for Auth.js, by using Redis</h2>

<div align="center">
This project is an adapter for Auth.js that allows you to use Redis as a caching system, and any other database behind, as a storage system.
</div>
<br>
<div align="center">🚦 The project is ready to use, but is still in development, so if you encounter any bugs or have any feature requests, please open an issue or a discussion.</div>
<br>

<div align="center">
<a href="https://github.com/boul2gom/adapter-redis-cache/issues/new?assignees=&labels=bug&template=BUG_REPORT.md&title=bug%3A+">Report a Bug</a>
Β·
<a href="https://github.com/boul2gom/adapter-redis-cache/discussions/new?assignees=&labels=enhancement&title=feat%3A+">Request a Feature</a>
Β·
<a href="https://github.com/boul2gom/adapter-redis-cache/discussions/new?assignees=&labels=help%20wanted&title=ask%3A+">Ask a Question</a>
</div>

---

<p align="center">
<a href="https://github.com/boul2gom/adapter-redis-cache/blob/develop/LICENSE.md">
<img src="https://img.shields.io/github/license/boul2gom/adapter-redis-cache?label=License&logo=Github" alt="License">
</a>
<a href="https://github.com/boul2gom/adapter-redis-cache/stargazers">
<img src="https://img.shields.io/github/stars/boul2gom/adapter-redis-cache?label=Stars&logo=Github" alt="Stars">
</a>
<a href="https://github.com/boul2gom/adapter-redis-cache/fork">
<img src="https://img.shields.io/github/forks/boul2gom/adapter-redis-cache?label=Forks&logo=Github" alt="Forks">
</a>
</p>
<p align="center">
<a href="https://github.com/boul2gom/adapter-redis-cache/discussions">
<img src="https://img.shields.io/github/discussions/boul2gom/adapter-redis-cache?label=Discussions&logo=Github" alt="Discussions">
</a>
<a href="https://github.com/boul2gom/adapter-redis-cache/issues">
<img src="https://img.shields.io/github/issues-raw/boul2gom/adapter-redis-cache?label=Issues&logo=Github" alt="Issues">
</a>
<a href="https://github.com/boul2gom/adapter-redis-cache/pulls">
<img src="https://img.shields.io/github/issues-pr-raw/boul2gom/adapter-redis-cache?label=Pull requests&logo=Github" alt="Pull requests">
</a>
</p>

---

## πŸ“– Documentation

You may refer to the documentation available [here](https://authjs.dev/getting-started/adapters/).
47 changes: 47 additions & 0 deletions packages/adapter-redis-cache/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "@auth/redis-cache-adapter",
"version": "1.0.0",
"description": "Enhanced caching adapter for Auth.js, by using Redis",
"homepage": "https://authjs.dev/",
"author": "boul2gom <[email protected]>",
"repository": "https://github.com/boul2gom/adapter-redis-cache",
"bugs": {
"url": "https://github.com/boul2gom/adapter-redis-cache"
},
"type": "module",
"types": "./index.d.ts",
"files": [
"*.js",
"*.d.ts*",
"src"
],
"exports": {
".": {
"types": "./index.d.ts",
"import": "./index.js",
"default": "./index.js"
}
},
"license": "ISC",
"keywords": [
"next-auth",
"next.js",
"auth.js",
"redis",
"cache"
],
"private": false,
"publishConfig": {
"access": "public"
},
"dependencies": {
"@auth/core": "workspace:*"
},
"peerDependencies": {
"@redis/client": "^1.6.0"
},
"devDependencies": {
"@redis/client": "^1.6.0",
"typescript": "^5.7.3"
}
}
Loading

0 comments on commit a9b5827

Please sign in to comment.