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;
|
if (!parsed) return;
|
||||||
|
|
||||||
const sessionTTL = Math.max(
|
const sessionTTL = Math.max(
|
||||||
Math.floor(
|
Math.floor(new Date(parsed.session.expiresAt).getTime() - now) / 1000,
|
||||||
(new Date(parsed.session.expiresAt).getTime() - now) / 1000,
|
|
||||||
),
|
|
||||||
0,
|
0,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -893,6 +891,7 @@ export const createInternalAdapter = (
|
|||||||
context,
|
context,
|
||||||
);
|
);
|
||||||
await refreshUserSessions(user);
|
await refreshUserSessions(user);
|
||||||
|
await refreshUserSessions(user);
|
||||||
return user;
|
return user;
|
||||||
},
|
},
|
||||||
updateUserByEmail: async (
|
updateUserByEmail: async (
|
||||||
@@ -913,6 +912,7 @@ export const createInternalAdapter = (
|
|||||||
context,
|
context,
|
||||||
);
|
);
|
||||||
await refreshUserSessions(user);
|
await refreshUserSessions(user);
|
||||||
|
await refreshUserSessions(user);
|
||||||
return user;
|
return user;
|
||||||
},
|
},
|
||||||
updatePassword: async (
|
updatePassword: async (
|
||||||
|
|||||||
Reference in New Issue
Block a user