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

Don't send anonymous consent to the ConsentProxy #670

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oliverturner
Copy link
Contributor

@oliverturner oliverturner commented Jul 26, 2022

Context

Anonymous users store a record of their consent in a local cookie rather than on the Consent Store, so this PR returns early from sendConsent (i.e. before making the POST request) if the fow prop is undefined.

This change avoids the need for the App to hard-code an API key.

Planned work

  • Here:
    1. A variant of this unit test to validate that the expected callbacks are run on form submission if fow is undefined
    2. An integration test that checks that the success alert is displayed on form submission when fow is undefined
    3. Optionally a snapshot
  • FT App:
    1. Pull in an updated version of this component
    2. Make the request for FoW data conditional on whether the user is authenticated (allowing the removal of the hard-coded API key)
    3. Ensure that the value of the fow prop passed to this component is appropriate to the type of user (i.e. undefined for anon, defined for authenticated)

@next-team next-team temporarily deployed to x-dash-adsdev-1103-priv-xqgbgt July 26, 2022 19:57 Inactive
@oliverturner oliverturner changed the title Allow anonymous users to set a consent preference without needing to Allow anonymous users to set a consent cookie Jul 27, 2022
@oliverturner oliverturner changed the title Allow anonymous users to set a consent cookie Don't send anonymous consent to the ConsentProxy Jul 27, 2022
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.

2 participants