Skip to content

Proposal: Pull API key from app.json / share with react-native-maps #84

@methodbox

Description

@methodbox

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Out of ScopeThis is not covered by React Native Maps Directions

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions