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

refactor: remove hardcoded google api key #15478

Merged
merged 2 commits into from Oct 31, 2018
Merged

Conversation

codebytere
Copy link
Member

Description of Change

Remove hardcoded Google API key as current pricing tiers and requirements have precluded it from working in a free capacity for quite some time. Update documentation to reflect that it must now exclusively be passed in via env var.

/cc @zcbenz

Checklist

  • PR description included and stakeholders cc'd
  • npm test passes
  • relevant documentation is changed or added
  • PR title follows semantic commit guidelines

Release Notes

Notes: remove hardcoded Google API key

@codebytere codebytere requested review from a team October 30, 2018 18:00
@codebytere codebytere changed the title refactor: remove google api key refactor: remove hardcoded google api key Oct 30, 2018
Copy link
Member

@ckerr ckerr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was the GOOGLEAPIS_ENDPOINT definition from he removed header not used anywhere?

webservice. Because this API key is included in every version of Electron, it
often exceeds its usage quota. To work around this, you can supply your own
Google API key in the environment. Place the following code in your main process
You can supply your own Google API key in the environment. Place the following code in your main process
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This loses the context that the previous revision had of "what is this key for."

Maybe something like

You can provide an API key for making requests to Google's geocoding webservice. To do this, place the following code in your main process

@deepak1556
Copy link
Member

deepak1556 commented Oct 31, 2018

@ckerr GOOGLEAPIS_ENDPOINT was required to be provided alongside the api key to form the request url, long time back. In the recent implementations, it is only required to provide the api key and the endpoint is hardcoded in chromium https://cs.chromium.org/chromium/src/services/device/geolocation/network_location_request.cc?l=216. So it can be removed safely.

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@codebytere codebytere merged commit b2e1a93 into master Oct 31, 2018
@codebytere codebytere deleted the remove-google-api-key branch October 31, 2018 14:49
@release-clerk
Copy link

release-clerk bot commented Oct 31, 2018

Release Notes Persisted

remove hardcoded Google API key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants