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

User is undefined after refreshing a page #50

Open
QuinB6248 opened this issue Jul 29, 2019 · 0 comments
Open

User is undefined after refreshing a page #50

QuinB6248 opened this issue Jul 29, 2019 · 0 comments

Comments

@QuinB6248
Copy link
Collaborator

QuinB6248 commented Jul 29, 2019

After refreshing a page , userData is lost. If you go to the same room again, you will not see your cards anymore.
Why this happens:
Users are not authenticated. A user is temporarily made and kept in the Redux store. The user also exists in the database but is no longer accessible. So if the user reloads, this data is lost from the store and they would need to make a new user (which can of course have the same name). But this user is not the same as the first user, in terms of primary key.
This poses a problem when someone accidentally refreshes in the middle of a retrospective. That user will then be stuck on done: false. Since that user is no longer accessible, the 'done' property of the retrospective will be permanently false. (It checks if all users have done: true before setting it's own done property to true.)
For testing purposes this can be fixed through httpie (or a similar command line interface tool) by making a 'done: true' update request directly with the userId of the lost user.

Though this will be simply fixed by implementing a future feature, namely adding authentication and login. This makes the user re-accessible.

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

No branches or pull requests

1 participant