@@ -36,12 +36,12 @@ UPSTASH_REDIS_TOKEN
36
36
``` ts filename="./auth.ts"
37
37
import NextAuth from " next-auth"
38
38
import { UpstashRedisAdapter } from " @auth/upstash-redis-adapter"
39
- import upstashRedisClient from " @upstash/redis"
39
+ import { Redis } from " @upstash/redis"
40
40
41
- const redis = upstashRedisClient (
42
- process .env .UPSTASH_REDIS_URL ,
43
- process .env .UPSTASH_REDIS_TOKEN
44
- )
41
+ const redis = new Redis ({
42
+ url: process .env .UPSTASH_REDIS_URL ! ,
43
+ token: process .env .UPSTASH_REDIS_TOKEN ! ,
44
+ } )
45
45
46
46
export const { handlers, auth, signIn, signOut } = NextAuth ({
47
47
adapter: UpstashRedisAdapter (redis ),
@@ -55,12 +55,12 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
55
55
``` ts filename="./src/auth.ts"
56
56
import { SvelteKitAuth } from " @auth/sveltekit"
57
57
import { UpstashRedisAdapter } from " @auth/upstash-redis-adapter"
58
- import upstashRedisClient from " @upstash/redis"
58
+ import { Redis } from " @upstash/redis"
59
59
60
- const redis = upstashRedisClient (
61
- process .env .UPSTASH_REDIS_URL ,
62
- process .env .UPSTASH_REDIS_TOKEN
63
- )
60
+ const redis = new Redis ({
61
+ url: process .env .UPSTASH_REDIS_URL ! ,
62
+ token: process .env .UPSTASH_REDIS_TOKEN ! ,
63
+ } )
64
64
65
65
export const { handle, signIn, signOut } = SvelteKitAuth ({
66
66
adapter: UpstashRedisAdapter (redis ),
@@ -74,12 +74,12 @@ export const { handle, signIn, signOut } = SvelteKitAuth({
74
74
``` ts filename="./src/routes/auth.route.ts"
75
75
import { ExpressAuth } from " @auth/express"
76
76
import { UpstashRedisAdapter } from " @auth/upstash-redis-adapter"
77
- import upstashRedisClient from " @upstash/redis"
77
+ import { Redis } from " @upstash/redis"
78
78
79
- const redis = upstashRedisClient (
80
- process .env .UPSTASH_REDIS_URL ,
81
- process .env .UPSTASH_REDIS_TOKEN
82
- )
79
+ const redis = new Redis ({
80
+ url: process .env .UPSTASH_REDIS_URL ! ,
81
+ token: process .env .UPSTASH_REDIS_TOKEN ! ,
82
+ } )
83
83
84
84
const app = express ()
85
85
0 commit comments