web-monetization-projects
web-monetization-projects copied to clipboard
feat(coil-extension): initial progress on cookie-based auth
TODO:
- [x]
- The action icon doesn't update immediately upon logging in
- [x] Check that credentials aren't sent for adapted content queries (youtube/twitch)
- SuperTokens.init(...) automatically wraps fetch
- [x] #3228
- Added SuperTokensService which does some hackery to work around this
- [x] Confirm that the "incognito":"spanning" declaration in the manifest allows the extension to send stored cookies with API requests.
- [ ] how to handle synchronizing sign ins (and outs) as was done with tokens?
- [ ] CookieHandlerInterface, it's not just setting one cookie, (99%) must behave like
document.cookie = cookiestring
and merge into document.cookie, rather than replace the property- consider extension cookies api with view to maintaining only a single session
- [ ] window.fetch SuperTokens wrapping is broken
- this is in the console, and might not actually be a problem, given references to fetch for
@coil/client
already created
- this is in the console, and might not actually be a problem, given references to fetch for
- [x] What happens when cookies are cleared, but coil.com localStorage.token remains?
- the extension will delete the token in the content script (running at document_start)
- [ ] Even for MV2, the SuperTokens.init(...) call will at some point trigger a call to use document.cookie (which may not even be a problem for MV2. For MV3, it's possible could use cookies api to get/set cookies on coil.com )
- See: https://github.com/supertokens/supertokens-website/blob/master/lib/ts/fetch.ts#L555
- [ ] browser-tabs-lock requires window/localStorage
- [ ] synchronization of token/cookies ( if you delete cookies at coil.com, the token will keep you logged in)
- [x] delete token at coil.com in content script
- [ ] #3316
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated |
---|---|---|---|---|
web-monetization-projects | ✅ Ready (Inspect) | Visit Preview | 💬 Add your feedback | Jan 26, 2023 at 4:51AM (UTC) |
@kyleaedwards Yah, it was writing to the wrong store and clearing from the correct one!