Skip to content

Conversation

@ssundahlTTD
Copy link
Contributor

No description provided.

},
});

if (!this.hasRegisteredSecureSignals) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can actually cause incorrect behavior with bidding if we allow this to register multiple times. The only downside here is that clearing secure signals cache and then logging in again without refreshing the page will not reset the flag. I'm not sure how likely that scenario is.

Copy link
Contributor

Choose a reason for hiding this comment

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

We do recommend clearing the cache at some point I think.
Yep - https://unifiedid.com/docs/guides/integration-google-ss#publisher-integration
So we can expect some publishers to be calling window.googletag.secureSignalProviders.clearAllCache(); at some point. This ended up being the workaround they suggested for if Secure Signals cached a null identity and then the user logged in.

Unfortunately I don't know if we have a way to tell if we're currently registered with Google :(

});
};

public resetSecureSignalsCache = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cache helper that also resets the internal state to allow re-registering secure signals within the same session.

});

if (!this.hasRegisteredSecureSignals) {
this.hasRegisteredSecureSignals = true;
Copy link
Contributor

Choose a reason for hiding this comment

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

is there any error that could happen below this that would cause registering secure signals to actually be false?

) {
if (window.__euid.getIdentity()) {
window.__euidSecureSignalProvider.registerSecureSignalProvider();
}
Copy link
Contributor

Choose a reason for hiding this comment

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

why not do the check here to see if it is already registered instead of inside the register function?

) {
if ('getIdentity' in window.__uid2! && window.__uid2!.getIdentity()) {
if (eventType === 'IdentityUpdated') {
window.__uid2SecureSignalProvider?.resetProviderRegistration();
Copy link
Contributor

Choose a reason for hiding this comment

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

This will reset the flag, but that means we'll register the collector again whenever identity is updated - is that OK? You mentioned registering it multiple times can cause problems with the bidder.

@ssundahlTTD ssundahlTTD merged commit cad8a10 into main Oct 2, 2025
3 checks passed
@ssundahlTTD ssundahlTTD deleted the sas-UID2-6118-secure-signals-timeouts branch October 2, 2025 16:47
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.

4 participants