privacycg / storage-access

The Storage Access API
https://privacycg.github.io/storage-access/
199 stars 26 forks source link

How can I reset the Storage Access API "previous interaction" state in Chrome? #194

Closed DavidScales closed 5 months ago

DavidScales commented 5 months ago

In order to request storage access with the Storage Access API, the user must have visited the embedded origin in a top-level context. Otherwise, storage access requests are rejected. See When to use the Storage Access API.

Question: Is there a way to test first-time visits in Chrome? In other words, I'd like to reset whatever counter tracks that I have visited a my site in a top level context.

I've tried incognito and cleared storage access from Chrome settings (chrome://settings/content/storageAccess) but I can't find a way to simulate the "user has never interacted with the site" scenario.

Apologies if this is covered elsewhere or this isn't the best medium for the question.

cfredric commented 5 months ago

The top-level user interaction requirement is not part of the SAA specification (and other browsers do not require it), so this is a Chrome-specific question. For Chrome-specific questions like this, I think a better place to ask would be on https://github.com/cfredric/chrome-storage-access-api, in the future.

To answer your question, though, you should be able to reset that state in Chrome by clearing browsing history for the site in question.

johannhof commented 5 months ago

Looks like Chris answered this and this repo is more about the API itself and less about browser specific implementation / testing questions, so closing :)