bazrafkan / google_place

A new Flutter package for handle google place api
MIT License
84 stars 122 forks source link

Why can't I get the platform specific API keys to work? #20

Closed frankyvij closed 2 years ago

frankyvij commented 3 years ago

Hi, thanks for the package. I do not want to enable web credentials on my google cloud - and I can't get my platform-specific credentials to work.

Is there a limitation like that?

frankyvij commented 3 years ago

I do have bundle identifier restriction on my cloud console configuration, but isn't that how it supposed to be?

ys-li commented 3 years ago

Same here. It's an awesome package but maybe since this particular plugin is implemented with HTTP requests instead of the official SDKs, we cannot get platform specific restrictions to work. This is a pretty significant barrier for production apps as restriction of API keys is important for preventing unauthorised uses.

eliezerp3 commented 3 years ago

Any update on this? It is a big security risk to not have API credentials locked to a specific bundle ID in production.

acoutts commented 3 years ago

Hi please try with my PR here: https://github.com/bazrafkan/google_place/pull/27

bazrafkan commented 2 years ago

please check on 0.4.1 version

dalton5 commented 2 years ago

is it working for you? Because from my side I have the error. I know it works because I can show my google map in the app and it is in the same api key.

Place API key is enabled.

And I setup the headers as below.

The detail error:

"{ "error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address xxxxxxxxx8, with empty referer", "predictions" : [], "status" : "REQUEST_DENIED" } "

dalton5 commented 2 years ago

Sorry I fixed it. Be careful.

Ensure to remove the colons ':' in the sha