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

Fix client state desync #128

Merged
merged 4 commits into from
Mar 26, 2020
Merged

Fix client state desync #128

merged 4 commits into from
Mar 26, 2020

Conversation

chen-robert
Copy link
Member

Resolves #117

Note that this introduces (significant?) overhead in the form of an extra database call per API endpoint. This shouldn't be too big of an issue, as most endpoints result in a database call regardless, meaning that this should at most double request time.

We may want to more closely monitor the performance penalty incurred here though.

Refactored server api to pass down a user object instead of uuid. This avoids redundant database
calls, and is more declarative. `requireAuth` should be synonymous with `requireValidUser`.
Copy link
Member

@ethanwu10 ethanwu10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🎉

@chen-robert chen-robert merged commit 438b6ad into master Mar 26, 2020
@chen-robert chen-robert deleted the fix/client-state-desync branch March 26, 2020 20:10
nick-ls pushed a commit to nick-ls/rctf that referenced this pull request Aug 6, 2024
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.

Client gets into bad state when there are invalid tokens in localstorage
2 participants