-
Notifications
You must be signed in to change notification settings - Fork 0
Add opt-out functionality to all secure signal sample pages #48
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
Merged
eiman-eltigani-ttd
merged 13 commits into
main
from
eee-UID2-6171-handle-optout-secure-signals
Oct 21, 2025
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ff73c1e
add optout functionality for server-side
c21731e
update optout response and fix grammar error in server-side
21b7389
add opt out functionality for client-server
e65c253
add opt out for js and react client side
4453a1d
add docker configuration for react client side
517b9de
Merge branch 'main' into eee-UID2-6171-handle-optout-secure-signals
ecaf46d
Merge branch 'main' into eee-UID2-6171-handle-optout-secure-signals
625a3c9
add optout functionality to client side and verify
49d8f4e
Remove unnecesary change to limit pr scope
4a74879
apply same logic for react client side
e023bf7
revert changes in react server.js
e050cf2
Merge branch 'main' into eee-UID2-6171-handle-optout-secure-signals
86208dd
update instructions in read me and env sample
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,41 @@ | ||
| # for local development | ||
| # UID2_BASE_URL="http://host.docker.internal:8080" | ||
| # ============================================================================== | ||
| # UID2 Examples Environment Configuration | ||
| # ============================================================================== | ||
| # Copy this file to .env and update the values for your local development setup. | ||
| # | ||
| # This file contains configuration for different UID2 integration examples. | ||
| # Not all variables are needed for all examples - see comments below. | ||
| # ============================================================================== | ||
|
|
||
| UID2_BASE_URL="https://operator-integ.uidapi.com" | ||
| UID2_CSTG_SERVER_PUBLIC_KEY="UID2-X-I-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEo+jcPlk8GWn3iG0R5Il2cbFQI9hR3TvHxaBUKHl5Vh+ugr+9uLMiXihka8To07ETFGghEifY96Hrpe5RnYko7Q==" | ||
| UID2_CSTG_SUBSCRIPTION_ID="DMr7uHxqLU" | ||
| # ------------------------------------------------------------------------------ | ||
| # Server-Side & Client-Server Examples | ||
| # ------------------------------------------------------------------------------ | ||
|
|
||
| UID2_BASE_URL="https://operator-integ.uidapi.com" # For local development using Docker, use: http://host.docker.internal:8080 | ||
| UID2_API_KEY="your-api-key" | ||
| UID2_CLIENT_SECRET="your-client-secret" | ||
| SESSION_KEY="your-session-key-here" | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # Client-Side Examples (all client-side token generation examples) | ||
| # ------------------------------------------------------------------------------ | ||
|
|
||
| # For local development with Docker, use UID2_BASE_URL="http://localhost:8080" | ||
| UID2_CSTG_SERVER_PUBLIC_KEY="UID2-X-I-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEo+jcPlk8GWn3iG0R5Il2cbFQI9hR3TvHxaBUKHl5Vh+ugr+9uLMiXihka8To07ETFGghEifY96Hrpe5RnYko7Q==" | ||
| UID2_CSTG_SUBSCRIPTION_ID="DMr7uHxqLU" | ||
|
|
||
| # ------------------------------------------------------------------------------ | ||
| # JavaScript SDK Configuration | ||
| # ------------------------------------------------------------------------------ | ||
|
|
||
| UID2_JS_SDK_URL="https://cdn.integ.uidapi.com/uid2-sdk-4.0.1.js" | ||
| UID2_JS_SDK_NAME="__uid2" | ||
| UID2_STORAGE_KEY="__uid2_advertising_token" | ||
|
|
||
| REACT_APP_UID2_BASE_URL="https://operator-integ.uidapi.com" | ||
| # ------------------------------------------------------------------------------ | ||
| # React Client-Side Example | ||
| # ------------------------------------------------------------------------------ | ||
|
|
||
| REACT_APP_UID2_BASE_URL="https://operator-integ.uidapi.com" # For local development using npm start, use: http://localhost:8080 | ||
| REACT_APP_UID2_CSTG_SERVER_PUBLIC_KEY="UID2-X-I-MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEo+jcPlk8GWn3iG0R5Il2cbFQI9hR3TvHxaBUKHl5Vh+ugr+9uLMiXihka8To07ETFGghEifY96Hrpe5RnYko7Q==" | ||
| REACT_APP_UID2_CSTG_SUBSCRIPTION_ID="DMr7uHxqLU" | ||
| REACT_APP_UID2_CSTG_SUBSCRIPTION_ID="DMr7uHxqLU" |
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
19 changes: 19 additions & 0 deletions
19
web-integrations/google-secure-signals/client-server/views/optout.html
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <title>Example for Client-Server UID2 SDK Integration with Google Secure Signals</title> | ||
| <link rel="stylesheet" type="text/css" href="/stylesheets/app.css" /> | ||
| <link rel="shortcut icon" href="/images/favicon.png" /> | ||
| </head> | ||
| <body> | ||
| <%- include('intro.html'); -%> | ||
| <p class="message">This email has opted out</p> | ||
| <p> | ||
| The email address you entered has opted out of UID2. No UID2 token can be generated for this | ||
| email. | ||
| </p> | ||
| <p><a href="/">Back to the main page</a></p> | ||
| </body> | ||
| </html> | ||
|
|
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
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
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
57 changes: 56 additions & 1 deletion
57
web-integrations/google-secure-signals/react-client-side/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.
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.
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.
Also created an optout banner because the response for opt-out and initial page load is the same.