Open cliffordfajardo opened 2 years ago
I think this change would be fairly easy & might not be a breaking change, I need to think about it a bit more though; simply wanted to post all my thoughts before I forget
Hi @cliffordfajardo
This seems like a good feature to have and if you open a PR I'll be happy to merge it 👍
Has there been any update on this? I would love to be able to pass these extra options as well. Without this flexibility we can't use this library in production.
Scenario
At work, our server's are not allowed to make requests to the external world / internet , unless they go through a specific proxy server for security reasons.
When I was doing my work locally everything worked fine, but it wasn't until I deployed to production
remix-auth-microsoft
didn't work as expected. This was becauseremix-auth-microsoft
makes API calls directlylogin.microsoft.com
andgraph.microsoft.com
, which unfortunately is not permitted on our infra.Feature Suggestion
Allow user to pass an optional
RequestExtraOptions
values to the options object that both thefetch
andRequest
API use.Temporary Solution
To resolve this challenge for my project, I copied the
src/index.ts
file from this repo, which contains the whole implementation of theremix-auth-microsoft
package. Then I modified it per the suggestions of Sergio (creator of core remix-auth packages). Discord thread of his suggestionsModified index.ts file (originally copied all of src/index.ts from this repo)
References / Related
@remix-run/node
remix-auth-*
packages