Closed PhilipSkinner closed 2 years ago
Many thanks for accepting this!
You're welcome! Thanks for submitting the PR.
I made a slight modification, switching the agent
option to be passed to the Strategy
constructor, rather than authenticate()
. Options to authenticate()
are intended more for authentication parameters (max age, display, etc), whereas the constructor options impact internal behavior - the latter seeming more fitting for this option. The changes make it similar to PR #65.
I've got a bit more maintenance and cleanup work, and then this will be published in the next release.
In order to use this with servers utilising HTTPS certificates that do not appear in the global ca_certs within node, you need to construct a custom agent and use it for any HTTPS requests.
I have updated the oauth2 library (0.9.15) to add this ability, and I have added in the small snippet of code below to pass through any given agent to that library.
No test coverage.