Skip to content

Commit db5801a

Browse files
committed
fix: cookie cache should be invalidated by update-user
1 parent d690af4 commit db5801a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

packages/better-auth/src/api/routes/update-user.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@ export const updateUser = <O extends BetterAuthOptions>() =>
5454
...additionalFields,
5555
},
5656
);
57+
/**
58+
* Update the session cookie with the new user data
59+
*/
60+
await setSessionCookie(ctx, {
61+
session: session.session,
62+
user,
63+
});
5764
return ctx.json({
5865
user,
5966
});

0 commit comments

Comments
 (0)