Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Commit

Permalink
fix(http.js): support simple-oauth2 version 4 (#412)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranrib authored Jan 26, 2021
1 parent 3f4b601 commit dbb71e3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/events/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,11 +519,19 @@ module.exports = {
fetchH2Wrapper,
fetch => fetch.OriginPool.prototype
);
// simple-oauth2 < 4.0
moduleUtils.patchModule(
'simple-oauth2/lib/client.js',
'request',
clientRequestWrapper,
client => client.prototype
);
// simple-oauth2 >= 4.0
moduleUtils.patchModule(
'simple-oauth2/lib/client/client.js',
'request',
clientRequestWrapper,
client => client.prototype
);
},
};

0 comments on commit dbb71e3

Please sign in to comment.