How to refetch(refresh) next-auth session manually on the client side?

Let's say the app has two unique models user and profile, both are in a one to one relation. User object will have a field named profileId which can be a string or null depending on whether the user object has a profile linked to it.

After a successful sign in we get the user session object back which has profileId === null. Then we force the user to create a profile if they want to make use of all functionalities of the app. So, the user creates a profile which gets linked to their user object in the database.

Now session.user.profileId === "somethingId". How do I refresh the session to update this change on client side without any page reloads and stuff? Like doing it the react way, refetch the sesion, set the session state to the refetched value.
Was this page helpful?