fix: refresh secondary storage sessions on user update (#4522)

This commit is contained in:
Fraol Lemecha
2025-09-17 19:16:19 +03:00
committed by Alex Yang
parent 2f8a0e1168
commit f1b0a4a627

View File

@@ -59,9 +59,7 @@ export const createInternalAdapter = (
if (!parsed) return;
const sessionTTL = Math.max(
Math.floor(
(new Date(parsed.session.expiresAt).getTime() - now) / 1000,
),
Math.floor(new Date(parsed.session.expiresAt).getTime() - now) / 1000,
0,
);
@@ -893,6 +891,7 @@ export const createInternalAdapter = (
context,
);
await refreshUserSessions(user);
await refreshUserSessions(user);
return user;
},
updateUserByEmail: async (
@@ -913,6 +912,7 @@ export const createInternalAdapter = (
context,
);
await refreshUserSessions(user);
await refreshUserSessions(user);
return user;
},
updatePassword: async (