Clear cookies when switching accounts#8490
Merged
jimchamp merged 10 commits intointernetarchive:masterfrom Dec 12, 2023
Merged
Conversation
for more information, see https://pre-commit.ci
Contributor
Author
|
I failed one of the CI/CD tests by accidentally importing infogami_logout twice. I have since fixed that but need to run the workflow again. |
mekarpeles
reviewed
Nov 6, 2023
Member
|
provisional LGTM, great job -- will state on testing and give it a try |
Collaborator
|
Taking off testing to test #8550 . |
jimchamp
approved these changes
Dec 12, 2023
Collaborator
jimchamp
left a comment
There was a problem hiding this comment.
This looks to be working as expected. Thanks, @ClementineAccount!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This closes #8005.
This follows the suggestions proposed by Mek in internetarchive/infogami#215 (comment)
by creating handlers to call a new function that clears the cookies "pd" and "sfw"
Technical
This implementation solves the issue mentioned by clearing the cookies using a handler to infogami, overriding infogami
logoutfunction. It also does this when 'logging in' as another user from the admin panel ofadmin/peopleTesting
(The video below under Screenshot also shows this step)
admin/peopleand observe that the pd cookie has been cleared.Screenshot
I recorded this video showcasing the 'pd' cookie being cleared when the hotfix is applied. Prior to the hotfix application, the pd cookie will never be cleared.
2023-11-03.20-31-15.mp4
Stakeholders
@mekarpeles proposed the fix concept and suggested this issue to me as a 'Good First Issue' so he would likely want to review my approach prior to a merge.