You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.
First of all - thank you for this library. We are running oauth2 PKCE flow in my company and this package was a big time-saver.
I have a question which I stumbled across when trying to use your package in a shared worker.
The default request implementation for browses is based on XMLHttpRequest js API which, unfortunately, is not available in the shared worker environment. Ofc, I know I can pass a custom request implementation to the constructor (and that's what I'm doing currently), but wouldn't it be actually better to migrate the default browser implementation so it uses fetch? I think this API is mature enough to be used as a replacement for XMLHttpRequest. And for IE11 - there are small polyfills avaiable (which work pretty similar to what you've done in request/browser.js) and users could be encouraged in the README to use them on their side. There is no need to bundle such "polyfill" directly within this library, right?
I saw some of your previous talks about this topic from the past, but since all of them were quite old (5 years ago) I thought it makes sense to raise this topic again. Please give me your insight/comments and, if needed, I'm willing to file the PR adjusting the library accordingly.
The text was updated successfully, but these errors were encountered:
FRSgit
changed the title
Usage in service worker - migrate to fetch?
Usage in shared worker - migrate to fetch?
Dec 30, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hey,
First of all - thank you for this library. We are running oauth2 PKCE flow in my company and this package was a big time-saver.
I have a question which I stumbled across when trying to use your package in a shared worker.
The default request implementation for browses is based on
XMLHttpRequest
js API which, unfortunately, is not available in the shared worker environment. Ofc, I know I can pass a custom request implementation to the constructor (and that's what I'm doing currently), but wouldn't it be actually better to migrate the default browser implementation so it usesfetch
? I think this API is mature enough to be used as a replacement forXMLHttpRequest
. And for IE11 - there are small polyfills avaiable (which work pretty similar to what you've done inrequest/browser.js
) and users could be encouraged in the README to use them on their side. There is no need to bundle such "polyfill" directly within this library, right?I saw some of your previous talks about this topic from the past, but since all of them were quite old (5 years ago) I thought it makes sense to raise this topic again. Please give me your insight/comments and, if needed, I'm willing to file the PR adjusting the library accordingly.
The text was updated successfully, but these errors were encountered: