Skip to content

fix for user submit in logedout #189

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

Closed
wants to merge 1 commit into from

Conversation

dprincecoder
Copy link

The code here is used to check if the user is no longer active in the page
by constantly checking for mousemove event
if the user is inactive, the page will reload then backend will know that users has logged out else where then redirect to the login page

@LieutenantRoger
Copy link
Collaborator

Oh, @dprincecoder this is not a good solution.

Can we try to check member's token only before making a submission ? Logout should clear member's token, so you shall be able to detect that the token for a user has been absent.

@LieutenantRoger
Copy link
Collaborator

Btw, please raise PR use the desired base branch, instead of targeting 'dev' branch directly, thanks.

@dprincecoder
Copy link
Author

Ok but the issue is when the user has logout in another tab, then this tab they kept open, when they pick a file it will go ahead and submit as per the issue_133 description, so what i did was to check when the users no longer interact with this tab , then go ahead and reload within 3 minutes this way our front-end then knows hey, this user is logged out because, their token has be cleared.
I will go ahead and open the PR in the challenges-bug-bash branch

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.

2 participants