I've implemented a solution to store the authentication token and user information in local storage when the user signs in, and delete it when the user signs out. This will allow us to persist the token and user information even after the page is refreshed or the tab is closed.
I've made the following changes:
1) Modified the SignInPage component to save the authentication token and user information to local storage when the user signs in.
2) Modified the App component to retrieve the token and user information from local storage when the page is refreshed or the tab is closed.
3) Modified the App component to delete the token and user information from local storage when the user signs out.
4) I've tested the implementation and everything seems to be working as expected. Please review and let me know if you have any feedback.
I have reviewed the pull request. It looks solid and works as expected. After this update, we will have more dynamic data storage. Thank you @umutdenizsenerr !
I've implemented a solution to store the authentication token and user information in local storage when the user signs in, and delete it when the user signs out. This will allow us to persist the token and user information even after the page is refreshed or the tab is closed.
I've made the following changes:
1) Modified the SignInPage component to save the authentication token and user information to local storage when the user signs in. 2) Modified the App component to retrieve the token and user information from local storage when the page is refreshed or the tab is closed. 3) Modified the App component to delete the token and user information from local storage when the user signs out. 4) I've tested the implementation and everything seems to be working as expected. Please review and let me know if you have any feedback.