Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Infura Project Secrets #464

Closed
naddison36 opened this issue Mar 20, 2019 · 3 comments
Closed

Add support for Infura Project Secrets #464

naddison36 opened this issue Mar 20, 2019 · 3 comments
Assignees
Labels
enhancement New feature or improvement.

Comments

@naddison36
Copy link

Infura has added support for an optional project secret to their API.

From https://infura.io/docs/gettingStarted/authentication
"As additional protection for your request traffic, you should use HTTP Basic Authentication to access our API when you are able to ensure the confidentiality of the Project Secret:"

curl --user :YOUR-PROJECT-SECRET \
  https://<network>.infura.io/v3/YOUR-PROJECT-ID

It'd be good if the InfuraProvider construction could take an optional project secret argument that is used to do the HTTP Basic Authentication.

Thanks
Nick

@ricmoo
Copy link
Member

ricmoo commented Mar 20, 2019

Good catch, I had not noticed that you could use that for authentication.

I'll add it soon. :)

@ricmoo ricmoo added the enhancement New feature or improvement. label Mar 20, 2019
@ricmoo ricmoo self-assigned this Mar 20, 2019
@kshinn
Copy link

kshinn commented Nov 19, 2019

I've added a PR to add this functionality. Please take a look and let me know what you think.

@ricmoo
Copy link
Member

ricmoo commented Apr 4, 2020

This was added a while ago to v5. I'm going to close this issue now, but if you have any problems, please re-open, or create a new issues.

Thanks! :)

@ricmoo ricmoo closed this as completed Apr 4, 2020
michaeltout pushed a commit to michaeltout/ethers.js that referenced this issue Aug 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement.
Projects
None yet
Development

No branches or pull requests

3 participants