We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c3c2d6 commit 3d88dfbCopy full SHA for 3d88dfb
2 files changed
apps/workers/auth/src/lib/better-auth/index.tsx
@@ -9,5 +9,24 @@ export function createAuth(env: CloudflareBindings) {
9
10
return betterAuth({
11
...authConfigs,
12
+ secondaryStorage: {
13
+ get: async (key: string) => {
14
+ return env.DEEPCRAWL_AUTH_KV.get(key);
15
+ },
16
+ set: async (key: string, value: string, ttl?: number) => {
17
+ return env.DEEPCRAWL_AUTH_KV.put(
18
+ key,
19
+ value,
20
+ ttl ? { expirationTtl: ttl } : undefined,
21
+ );
22
23
+ delete: async (key: string) => {
24
+ return env.DEEPCRAWL_AUTH_KV.delete(key);
25
26
27
+ rateLimit: {
28
+ ...authConfigs.rateLimit,
29
+ storage: 'secondary-storage',
30
31
});
32
}
apps/workers/auth/src/lib/better-auth/options.ts
0 commit comments