capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

@capacitor/google-maps support for using Places SDK Autocomplete natively on Android | How to restrict the API_KEY

Open willydavid1 opened this issue 3 years ago • 3 comments

Feature Request

Plugin

  • @capacitor/google-maps

Description

The @capacitor/google-maps native plugin should have support for using the Places SDK for Android natively on Android. The plugin currently works very well with maps. But if you want to add address autocomplete functionality and then center that address on the map it gets complicated. There is no plugin for it.

Places Autocomplete can be implemented with JavaScript from the browser but when trying to restrict the API KEY I have no options to prevent my API KEY from being copied and a surprise cost can be generated.

image

Platform(s)

  • Android

Preferred Solution

Native support for Place Autocomplete with Places SDK to get suggested addresses and be able to restrict the API key

Additional Context

  • https://stackoverflow.com/questions/62417501/how-to-restrict-api-key-google-maps-for-ios-in-an-ionic-app
  • https://forum.ionicframework.com/t/security-concern-cant-restrict-api-access-while-using-googlemaps-browser-api-in-ionic-apps/129577/11

willydavid1 avatar Jun 15 '22 18:06 willydavid1

Same problem here, would love to see some support for additional libraries especially the places api

MRDNZ avatar Nov 13 '22 19:11 MRDNZ

@willydavid1 where you able to find a solution on this?

xylish7 avatar Oct 25 '23 10:10 xylish7

Same problem here. We are currently fully using the javascript librairy for Maps and Places due to this limitation. But our API key is now vulnerable. Has capacitor team a plan to implement this SDK in Google Maps plugin?

bertrand-ravier avatar Jan 22 '24 09:01 bertrand-ravier