worker-dom icon indicating copy to clipboard operation
worker-dom copied to clipboard

cookie support

Open patrickkettner opened this issue 5 years ago • 5 comments

A (sadly) very common pattern for user auth is to rely on cookies for state. As a result, sites need to be able to know up to the moment information about the cookie store, that may be modified in other browser windows (ie multitab). Many major websites need to be aware of cookie jar modifications in other windows (either by rapidly polling document.cookie for changes, or via the Cookie Store API. amp-script/worker dom introduce some really exciting opportunities for component reuse, but in order for that to be possible to many of these authors, we would need to provide a cookie interface, and one that isn’t just a snapshot of the cookie jar on hydration

patrickkettner avatar Apr 21 '19 05:04 patrickkettner

(This is a follow up to a conversation at ampconf- cc @kristoferbaxter @nainar )

patrickkettner avatar Apr 21 '19 05:04 patrickkettner

+1 vote for the feature. We really really need it.

ngocdb avatar May 13 '19 03:05 ngocdb

Plan of attack:

  1. Leverage Cookie Store API.
  2. Create a Polyfill that's lazily loaded and configurable with a different polling interval.

kristoferbaxter avatar May 24 '19 18:05 kristoferbaxter

I'd love to see this happen, especially as we're considering making this possible in traditional AMP components in https://github.com/ampproject/amphtml/issues/25670.

@kristoferbaxter wdyt?

morsssss avatar Feb 23 '20 23:02 morsssss

This would be great, additionally it would be nice if it could be scoped so we don't need to worry about cross app cookie overlap

diffidentDude avatar Feb 24 '20 23:02 diffidentDude