-
Notifications
You must be signed in to change notification settings - Fork 72
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
PROD-1389 for TCF, any consent pref that is not defined on cookie should be assumed opt-out #4430
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
clients/fides-js/src/lib/cookie.ts
Outdated
: // If experience contains a tcf entity not defined by tcfEntities, this means either: | ||
// A) Most commonly, user has opted out, and opt-outs are not tracked by TC string. It's safe to assume this case. | ||
// B) There is a new tcf entity that requires consent. In this case we would just resurface the banner | ||
ConsentMechanism.OPT_OUT; |
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 we only want this for the fides string override case. in other words, I think this change would break this flow:
- No fides string override
- User opts out of all purposes
- A new legint purpose is added
- On load, the new legint purpose would be opted out, even though in this case, because we have the cookie key consent, we actually know the user has not opted out.
I think this could be fixed with...
const defaultPreference = cookie.fides_string ? ConsentMechanism.OPT_OUT : item.default_preference;
const preference = Object.hasOwn(cookieConsent, item.id)
? transformConsentToFidesUserPreference(
Boolean(cookieConsent[item.id]),
ConsentMechanism.OPT_IN
)
: defaultPreference;
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.
Ah this makes more sense, thanks @allisonking !
Passing run #5246 ↗︎
Details:
Review all test suite changes for PR #4430 ↗︎ |
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.
nice job turning this around so quickly! 💯
…uld be assumed opt-out (#4430)
Closes https://ethyca.atlassian.net/browse/PROD-1389
Description Of Changes
For TCF, if we have a previously saved
fides_consent
cookie or afides_string
override, any consent pref that is not defined on cookie.tcf_consent should be assumed opt-out, instead of using the defaults on the experience.Code Changes
cookie
too).Steps to Confirm
?fides_string
query param to the URL, e.g. http://localhost:3000/fides-js-components-demo.html?fides_string=CP1OzUAP1OzUAGXABBENATEgAAAAAAAAAAAAAAAAAAAA.IABE,1~Pre-Merge Checklist
CHANGELOG.md