Hiding Third Party Api Keys Create-React-Native-App

#1

Is there a way to hide third party api keys with Expo using create-react-native-app?

0 Likes

#2

You should never store any API key that is sensitive inside of an app, whether in React Native or a typical native app. Keep them on your server instead. Here’s an article that explains the various approaches to get your API keys if stored in your Android application: https://rammic.github.io/2015/07/28/hiding-secrets-in-android-apps/ – the same thing applies for iOS, just different tools.

1 Like

#3

I’m using firebase as my backend but apparently Expo doesn’t support firebase cloud storage at this time which is where firebase suggests you store your hidden keys etc.

0 Likes

#4

To add to Brent’s post (which shows how including a secret key with your app means it’s not secret anymore), what you should do is write some code on your server that uses the secret key to talk to third-party APIs, and have your app talk to your server. This way your server is responsible validating requests from your app and never reveals the third-party secret key to the rest of the world.

1 Like

#5

I’m using firebase as my backend but apparently Expo doesn’t support firebase cloud storage at this time which is where firebase suggests you store your hidden keys etc.

Interesting! Can you link me to a resource about that? I can’t find anything

0 Likes