I have 2 applications 1 website written in nextJs and another one written in React. In the react app the user can log in and based on this action we set a cookie so that the website can take the data of the logged-in user. When the user is logged in in both applications a widget is displayed.
current behavior: When the user logs in to the React application, the widget is set, but in the NextJs application, the widget is displayed after refreshing the page.
expected behavior: When the user logs in or logs out in the React application, I would like to display or not the widget without refreshing the page.
Is that possible? Any suggestion will be appreciated.