Skip to content
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

move GPC preferences before we send fidesInitialized event #3561

Merged
merged 9 commits into from
Jun 26, 2023

Conversation

eastandwestwind
Copy link
Contributor

@eastandwestwind eastandwestwind commented Jun 14, 2023

Closes #3489

Code Changes

  • move GPC preferences before we send fidesInitialized event

Steps to Confirm

  • Enable an opt-out notice (opt-in by default)
  • Enable GPC signal
  • Load a site with fides.js installed
  • Observe the console events and see that the initial FidesInitialized event should have the opt-out notice set to false
Screenshot 2023-06-22 at 5 00 39 PM

Pre-Merge Checklist

Description Of Changes

Write some things here about the changes and any potential caveats

@cypress
Copy link

cypress bot commented Jun 14, 2023

Passing run #2907 ↗︎

0 4 0 0 Flakiness 0
⚠️ You've recorded test results over your free plan limit.
Upgrade your plan to view test results.

Details:

Merge dfe36dc into a081a87...
Project: fides Commit: ac1f42d4ef ℹ️
Status: Passed Duration: 00:58 💡
Started: Jun 26, 2023 3:23 PM Ended: Jun 26, 2023 3:24 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

Copy link
Contributor

@allisonking allisonking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

woot this worked great, nice job!

@allisonking
Copy link
Contributor

Actually one thing I just thought of: this means a FidesUpdated could potentially be sent before a FidesInitialized, since the GPC func sends a FidesUpdated. is that okay?

@eastandwestwind
Copy link
Contributor Author

@allisonking regarding your Q:

Actually one thing I just thought of: this means a FidesUpdated could potentially be sent before a FidesInitialized, since the GPC func sends a FidesUpdated. is that okay?

This scenario may happen if there is no existing Fides cookie. Because we will always send the FidesInitialized event after the FidesUpdated event, it's OK since a subscriber to events would receive the initialized event.

@eastandwestwind eastandwestwind merged commit 3a4798f into main Jun 26, 2023
@eastandwestwind eastandwestwind deleted the 3489-gpc-earlier branch June 26, 2023 15:34
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.

GPC preferences are applied *slightly* too late in the Fides.js lifecycle
2 participants