Skip to content

Fix: Logout not working on dashboard#121

Open
teenananana wants to merge 1 commit intomeabhisingh:masterfrom
teenananana:fix-logout-issue
Open

Fix: Logout not working on dashboard#121
teenananana wants to merge 1 commit intomeabhisingh:masterfrom
teenananana:fix-logout-issue

Conversation

@teenananana
Copy link
Copy Markdown

The logout button on the Dashboard was not redirecting users to the login page after logging out, causing the session to appear active until a manual refresh. This issue occurred because Axios was not configured to send credentials with requests, and the logout handler lacked a navigation redirect. The fix involved adding axios.defaults.withCredentials = true in App.js to ensure proper session handling and including navigate('/login') after the logout() dispatch in the logout function. After these changes, the logout now clears the session correctly and redirects users to the login page as expected.

@teenananana
Copy link
Copy Markdown
Author

hi, I have these changes Added axios.defaults.withCredentials = true in App.js and included navigate('/login') after dispatch(logout()). kindly review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant