-
Notifications
You must be signed in to change notification settings - Fork 47
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
(PXP-7429): fix/workspaceLogout: added backup if api call fails to refresh user, … #804
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6994422
fix/workspaceLogout: added backup if api call fails to refresh user, …
49a8a3d
fix/workspaceLogout: added more comments
79b0644
fix/workspaceLogout: moved workspace logic to workspace, removed old …
f5ab350
fix/workspaceLogou: remove unneeded looping of retrying user api calls
4844c94
fix/workspaceLogout: fix lint error
57c8c2c
Merge branch 'master' into fix/workspaceLogout
ocshawn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why logging out user at here? the logic was if it can reach
refreshSession()
then it means the user is still logged in and actively using the portalThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the bug had to do with the user being logged out, but not alerted that they had been logged out, leading to other errors. this code checks if they are still logged in and if not alerts them, it does not log them out. I am still not 100% on how all of this code works if you do not think this check is needed i can remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the bug was actually buried deeper in the logic flow: the
notifyUserIfTheyAreNotLoggedIn
function will make a call to the submission api and when it returns a 401 the portal assumes the user is logged out. But this will result in as the current behavior that for some times the popup showed up early while in other occassions some are shown up later.This is mainly due to the fact that the access token in cookie is not updated until the pervious one has expired. After this fix uc-cdis/fence#874 is merged, both session token and access token will be updated.
For that case, I probably will test and change this logic flow back to let portal actively logout users. So this piece of code will probably be removed in my work. I'm okay will merging as is because I think it won't break things, just a FYI
The changes to the workspace code LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, thanks for looking over, im glad someone else was also looking into this