Fix issue where required cookies are removed by orejime#4174
Merged
tdonohue merged 1 commit intoDSpace:mainfrom Apr 11, 2025
Merged
Fix issue where required cookies are removed by orejime#4174tdonohue merged 1 commit intoDSpace:mainfrom
tdonohue merged 1 commit intoDSpace:mainfrom
Conversation
… clicks accept in the popup
Member
tdonohue
approved these changes
Apr 11, 2025
Member
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @artlowel ! I've tested this today and verified it fixes both #4133 and also #3963 (which seems to have had the same underlying cause, but for the authentication cookie). Neither of these can be reproduced with this PR installed.
Glad you discovered this was simply a misconfiguration of Orejime.
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.
References
dsAuthInfocookie is lost) #3963Description
This issue was caused by some unintuitive behavior of the orejime cookie popup. If apps are required, their cookies are still automatically deleted before the user has clicked "accept" or "decline" in the popup. And in the case where you don't have optional cookies that popup is never shown, so as a result all required cookies keep being deleted every time you refresh the page.
The solution was to set
optOut: truefor all required apps. This means that the cookies will be assumed to be allowed unless the user turns them off. Since they're required as well, the user can't turn them off. You'd expectoptOutto be implied by therequiredoption. But it seems like it isn't.Instructions for Reviewers
Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.