mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
fix: refresh secondary storage sessions on user update (#4522)
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user