How to Secure API Keys in React Native Expo w/ Firebase

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 9

  • @brendanseanmurphy
    @brendanseanmurphy День назад +1

    good video thanks! but what about the firebaseConfig api key etc... aren't you now just creating the problem again? Can't the firebase api key can be extracted from the app?

    • @andrewheimdev
      @andrewheimdev  День назад

      Yes my understanding is that the googleservice.json file is exposed to the app, but that's okay. You are supposed to restrict how it is used in the server. And that's why we set the api key on the server, so you have to be logged in and pass through the security rules to get access to the api key.
      That being said, nothing is really safe on the internet, but the idea is to add security layers so it's not easy to access sensitive info.
      This is just another layer so, that users can't directly copy the api key after decompling the app

  • @FrankRamosYT
    @FrankRamosYT 2 месяца назад +1

    Awesome video Andrew! It’s really important to not expose secret keys anywhere on the front end in React Native.

  • @satyaviswapavanranga5915
    @satyaviswapavanranga5915 Месяц назад +1

    Thank you so much Andrew, Dumb question! is this free?

    • @andrewheimdev
      @andrewheimdev  Месяц назад

      No problem! And no dumb questions!
      This is free for the first 2 million invocations. Then it's $0.40/million after!
      And you can check out more specific pricing here:
      firebase.google.com/pricing

    • @satyaviswapavanranga5915
      @satyaviswapavanranga5915 Месяц назад +1

      @@andrewheimdev great! Thank you for the quick reply

    • @andrewheimdev
      @andrewheimdev  Месяц назад

      @@satyaviswapavanranga5915 no problem!