Renewing tokens inconvenient with offline-first PWAs
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- web-dev
Research direction
Start by tracing how origin-trial tokens are issued and validated when an offline-first PWA serves its primary content from a long-lived Service Worker cache. Review the interaction with the Native Filesystem API experiment and IndexedDB risk described here; done means defining and implementing a safe way to renew a token without requiring cache clearing or globally enabling the flag.
Written by the indexing model from the issue text.
Description
We have an offline-first PWA which loads primary from a Service Worker cache which is kept long-term in between major releases (which could be a few months apart).
It's difficult to update an origin trial token since the old token is kept in the SW cache. When it expires it keeps using the expired token and so disables the feature, even after we renewed it and deployed the updated token to production.
We have an opt-in experiment to use the new Native Filesystem API, and in practice this means users see the feature disappear when our old token expires. These users can resort to flipping the flag, or clearing the cache - which is dangerous since our PWA also allows saving your work to IndexedDB, and if you pick the wrong settings, it'll also wipe all their work from storage. Therefore it seems safer for us to tell users to resort to flipping the flag instead - which then enables it for the whole web.
In particular the Native Filesystem API origin trial appears to be running longer than usual, meaning it appears likely this problem will happen repeatedly during the origin trial.
I'd suggest adding the ability to renew the same token, rather than having to change it.
- Dominant language
- Bikeshed
- Stars
- 536
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GoogleChrome/OriginTrials
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
GoogleChrome/OriginTrials#111 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
GoogleChrome/OriginTrials#131 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
GoogleChrome/OriginTrials#126 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
GoogleChrome/OriginTrials#102 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
GoogleChrome/OriginTrials#100 ·
All issues in GoogleChrome/OriginTrials
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
OHDSI/Data2Evidence#3749 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Community-VyProjects/VyManager#1711 ·
Maintainers usually reply within 1 day
-
maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
assistant-ui/assistant-ui#10946 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
thunder-id/thunderid#7092 ·
Maintainers usually reply within 1 day