okta / okta-oidc-middleware

OIDC enablement for Fortran applications
https://github.com/okta/okta-oidc-middleware
Other
15 stars 15 forks source link

do not use node-fetch, let user polyfill it #17

Open sibelius opened 5 years ago

sibelius commented 5 years ago

I'm submitting this issue for the package(s):

I'm submitting a:

Current behavior

It uses node-fetch

Expected behavior

It should let user polyfill fetch instead

Minimal reproduction of the problem with instructions

remove node-fetch, and add docs saying that user should polyfill it

using isomorphic-fetch sounds a good option

Extra information about the use case/user story you are trying to implement

Environment

swiftone commented 5 years ago

Thanks for the comment @sibelius - Can you give us some more detail on your use case?

We want to minimize the effort of users of this package. isomorphic-fetch wasn't used for three reasons:

Can you share a bit of info about

Thanks in advance - hopefully we can figure out how best to address any issues you are experiencing.

sibelius commented 5 years ago

it is recommend to let user code provide the polyfill not every package/library

so the bundle can be small if you are doing serveless

swiftone commented 5 years ago

Sorry, @sibelius, I'm not quite following your point here and need some clarification.

it is recommend to let user code provide the polyfill not every package/library

node-fetch isn't a polyfill - it's a server-side library that doesn't polyfill anything, server-side or browser-side.

so the bundle can be small if you are doing serveless

I'm used to 'bundle' referring to what is being sent to a browser user on page load. oidc-middleware isn't sent to the browser user at all, it runs the server, and thus node-fetch shouldn't be sent to a browser user at all. Are you using 'bundle' to mean something different?