uploadthing to handle my image uploads. On the uploadthing server, I update the user’s image in the database like in the code below. I did not use authClient.updateUser to update the user's image in the database. Now, every time I have a successful update, I check my database and see that the user’s image is updated correctly. My only problem is that the content of the user in the session authClient.userSession does not update—it seems there is about a minute delay before the session is updated. I don't know if it’s just my internet acting up or if I simply don't know how to handle this kind of situation. When there is a change in the database, the session on the client side should be updated immediately so that when I call router.refresh(), the image is displayed right away.

useSession will only update whenever a relevant endpoint was called from the client which would have something to do with modifying the user session.getSession yourself.