-
-
Notifications
You must be signed in to change notification settings - Fork 204
Description
Using the API key as a prop presents obvious security issues. The key should be able to be pulled from app.json
just as with react-native-maps
.
I have a feeling this isn't something that is easy to do, but as it is currently it presents an issue that controls on the API key associated with things like the bundleIdentifier
probably don't work as expected.
The best solution I can conceive is not making the prop required and using it from a dependency from react-native-maps
, since this is required anyway.
I'm going to experiment with this on my own and I believe that as long as MapView
(or another component which relies on an API key) is part of your component and wraps MapViewDirections
it shouldn't be necessary to use the key directly.
Obviously, this means a bit of a rewrite on react-native-maps-directions
to not request the key, but there must be some way to code around it.