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
[Update on 2022-06-29]: For any reader of this idea, here is an update: per response from @ricmoo on #3096: @ricmoo is planning for a minor feature to support fetchOptions for browser-only window.fetch specific parameters to support credentials. For v6 this will not be necessary because v6 choose to be more network-lib neutral.
We like to propose the ability to include credentials for fetch api. One of the use cases we encountered is that the ethers has to talk to a geth node behind a gated proxy.
Or, Option 3 make it more flexible by allowing multiple request options to be specified, just like how headers are being specified from the ConnectionInfo
We included a Proof of Concept pull request: #3096
Reference: Previously, a relevant idea/question was brought up in #1819. The solution was provided for basic authentication, which is to include password and username in the URL. However, this is not going to work for a majority of other authentication schemes. Therefore, we propose to include credentials for other use cases.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
[Update on 2022-06-29]: For any reader of this idea, here is an update: per response from @ricmoo on #3096: @ricmoo is planning for a minor feature to support
fetchOptions
for browser-onlywindow.fetch
specific parameters to support credentials. For v6 this will not be necessary because v6 choose to be more network-lib neutral.@ricmoo I guess we could close this idea?
Original post:
Hi ethers.js author and contributors
We like to propose the ability to include credentials for fetch api. One of the use cases we encountered is that the
ethers
has to talk to a geth node behind a gated proxy.The code we propose (Option 1) will look like
Of course this is a proof of concept.
In a prod use case, it's probably better (Option 2) to use a special flag to control whether we want to include credentials, such as
Or, Option 3 make it more flexible by allowing multiple request options to be specified, just like how
headers
are being specified from theConnectionInfo
We included a Proof of Concept pull request: #3096
Reference: Previously, a relevant idea/question was brought up in #1819. The solution was provided for basic authentication, which is to include password and username in the URL. However, this is not going to work for a majority of other authentication schemes. Therefore, we propose to include credentials for other use cases.
Beta Was this translation helpful? Give feedback.
All reactions