WICG / first-party-sets

Home Page:https://wicg.github.io/first-party-sets/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

MeganAlexia opened this issue · comments

commented

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

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