-
Notifications
You must be signed in to change notification settings - Fork 36
Writing to Shared Storage in generateBid #210
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
Comments
I believe (off the top of my head) that the shared storage data origin should be that of the context of the worklet. That should be the buyer origin in the bidding case, and seller origin in the seller case. @xyaoinum would know better. |
@ccharnay67: Josh is correct. How did you verify that the write did or did not happen? Also, it might be helpful to check the DevTools console for any errors that could provide clues. |
@xyaoinum and @jkarlin thanks for your answers. I originally had a look at DevTools > Applications > Shared Storage, and that would never show me the write events I wanted to see. But I now had a look at the local Chrome Shared Storage DB, and I confirm the write happened to the buyer origin even with the publisher page being another domain, which confirms what you say. Thanks again! I'll close this. |
Cool, glad it's working. @pythagoraskitty for a potential devtools issue. |
Hello,
We have use cases where we think of leveraging Shared Storage by writing to it during a call to generateBid in Protected Audience, and read from it later.
Calling sharedStorage.set seems possible in generateBid, but we are not sure to which origin Shared Storage writes to in this case, could you please clarify it?
According to the documentation: “the data is written to the origin of the browsing context that the call was made from”, but for generateBid it is unclear what the context is.
We think it’s either the publisher origin or the generateBid script origin. When we tested on a publisher page with the same origin as the bidding script, we see a write to Shared Storage. However, when the publisher origin differs from the script origin, we see no write at all to shared storage. Is this normal? Must the publisher page and bidding script have the same origin for generateBid to be able to write to shared storage?
The text was updated successfully, but these errors were encountered: