Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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