From d43d134a58d4d4d0c442ffd49b71144c5d840c56 Mon Sep 17 00:00:00 2001 From: murtazabaanihali Date: Mon, 10 Feb 2025 16:58:15 +0530 Subject: [PATCH] Fix issue with missing user role in Redis authentication --- src/pages/api/auth/login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/api/auth/login.ts b/src/pages/api/auth/login.ts index ab17c9376..23dedfc81 100644 --- a/src/pages/api/auth/login.ts +++ b/src/pages/api/auth/login.ts @@ -50,7 +50,7 @@ export default async ( if (user && checkPassword(password, user.password)) { if (redisEnabled) { - const token = await saveAuth({ userId: user.id }); + const token = await saveAuth({ userId: user.id, role: user.role }); return ok(res, { token, user }); }