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

Google API key restriction #40

Open
kimsean opened this issue Mar 11, 2021 · 3 comments
Open

Google API key restriction #40

kimsean opened this issue Mar 11, 2021 · 3 comments

Comments

@kimsean
Copy link

kimsean commented Mar 11, 2021

Hello. How do you handle Google API Key restrictions ? I already added package name and SHA-1 and it seems that its not working. I still don't have access

@BaderSerhan
Copy link

I don't think there's a way to do it using this library or any react-native library as a matter of fact.

Check this issue.

Also, check the compatibility section from react-native-google-places-autocomplete library's README file:

Compatibility

This library does not use the iOS, Android or JS SDKs from Google. This comes with some Pros and Cons.

Pros:

  • smaller app size
  • better privacy for your users (although Google still tracks server calls)
  • no need to keep up with sdk updates

Cons:

  • the library is not compatible with a Application key restrictions
  • doesn't work directly on the web without a proxy server
  • any Google API change can be a breaking change for the library.

I think that this library is using the APIs the same way, so I guess you cannot restrict the API keys.

@shyammanek
Copy link

Can u please share this Solution

@shyammanek
Copy link

I find a solution,
https://github.com/devfd/react-native-geocoder
if we use Geocoding then we face this restrictions Problem then we use react-native-geocoder this is provide same features and only required Places API service from the Google cloud Console side

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

No branches or pull requests

3 participants