Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear Project Data on Logout #402

Merged
merged 1 commit into from
Jun 9, 2020
Merged

Conversation

lemazza
Copy link
Contributor

@lemazza lemazza commented Jun 1, 2020

To prevent the problem of a user still being able to see their own project data after logging out.

Just made the call to an existing project contigent upon their being a logged in user within the initiateEngine useEffect. And made the useEffect rerun on changes to account. Now when a user logs out the initateEngine will clear its own form inputs.

As mentioned in issue 400, this does not touch the jwt cookie on logout, which could potentially be a security issue.

One potential issue I can see with this solution is that a user will lose all their data if they're working on an unsaved project and log out. However, since a user who isn't logged in can't save a project anyway I'm not sure that this matters.

closes #400

@lemazza lemazza requested a review from fyliu June 1, 2020 21:22
@nclairesays nclairesays merged commit 57023da into develop Jun 9, 2020
@nclairesays nclairesays deleted the louis-400-logout-clears-data branch July 15, 2021 01:14
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.

Clear projects data when logging out
2 participants