From 9172098fa735d085885897e86b01635f83e9a4f9 Mon Sep 17 00:00:00 2001 From: Brian Cao Date: Mon, 21 Nov 2022 23:23:16 -0800 Subject: [PATCH] Fix login secure token creation. --- pages/api/auth/login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/auth/login.ts b/pages/api/auth/login.ts index b7458a7a..e23415a9 100644 --- a/pages/api/auth/login.ts +++ b/pages/api/auth/login.ts @@ -42,7 +42,7 @@ export default async ( await redis.set(key, user); - const token = createSecureToken(key, secret()); + const token = createSecureToken({ key }, secret()); return ok(res, { token, user }); }