Skip to content

User is undefined after refreshing a page #50

@QuinB6248

Description

@QuinB6248

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions