docs: fix Incorrect JSON Handling in secondaryStorage.get example (#1842)

This commit is contained in:
Isolated
2025-03-16 18:12:19 +05:30
committed by GitHub
parent 001126ba5e
commit 8b18362451

View File

@@ -82,7 +82,7 @@ export const auth = betterAuth({
secondaryStorage: {
get: async (key) => {
const value = await redis.get(key);
return value ? JSON.stringify(value) : null;
return value ? value : null;
},
set: async (key, value, ttl) => {
if (ttl) await redis.set(key, value, { EX: ttl });