fix: cookie cache should be invalidated by update-user

This commit is contained in:
Bereket Engida
2024-10-27 16:40:07 +03:00
parent d690af4f34
commit db5801a5e7

View File

@@ -54,6 +54,13 @@ export const updateUser = <O extends BetterAuthOptions>() =>
...additionalFields,
},
);
/**
* Update the session cookie with the new user data
*/
await setSessionCookie(ctx, {
session: session.session,
user,
});
return ctx.json({
user,
});