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

How can I reset the permission "storage-access"? #170

Open
MeganAlexia opened this issue Aug 10, 2023 · 1 comment · Fixed by GoogleChrome/developer.chrome.com#7071
Open

Comments

@MeganAlexia
Copy link

Hi,

I'm not sure if this is the best place to ask, so please feel free to redirect me if not.

While trialling first-party-sets, I came to a point where I wanted to go back to the original flow the user would go through when accessing an iFrame for the first time (ie when the user interacts within the iFrame, it triggers Chrome prompting to grant storage access). From what I understood, when the user accepts (or denies) the access, it sets a permission called "storage-access" that is then accessible from navigator.permission. I was wondering if there is anyway for me to reset this permission to its default state so I can test the user flow easily? The only thing I've found that comes close to resetting was the navigator.permissions.revoke that now seems deprecated and so unusable.

I have also tried resetting the permission on the website that embeds the iFrame and it didn't seem to do the trick.

Any help would be much appreciated, let me know if more information is needed!

Thanks,
Megan

@cfredric
Copy link
Collaborator

Hi @MeganAlexia, thanks for testing out First-Party Sets in Chrome!

From what I understood, when the user accepts (or denies) the access, it sets a permission called "storage-access" that is then accessible from navigator.permission.

Yep, that's right.

I was wondering if there is anyway for me to reset this permission to its default state so I can test the user flow easily?

Good question - we should perhaps document this in the testing instructions, but there are currently two ways to remove all FPS-mediated permissions and reset to the default state:

  • Restart the browser (e.g. by visiting chrome://restart). (Should work in any recent Chrome version.)
  • Visit chrome://settings/cookies, set the default behavior toggle to "Block third-party cookies", and toggle the "Allow related sites to see your activity in the group" option off and then on again. (Be sure to refresh whatever page you're testing on, too.) (Should work in Chrome 116.0.5845.42 or later.)

Please give one or both of those a try, and let me know if they're not working for you.

Chris

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 a pull request may close this issue.

2 participants