Your API Keys are NOT SAFE in a native app 🤬

Поделиться
HTML-код
  • Опубликовано: 12 июн 2023
  • Can you use secret keys in native apps? What happens with API keys in React Native? Let me show you how fast I can get to the source of your app, and how you can make your app more secure.
    🪐 Become a stellar React Native Dev: galaxies.dev/reactnative
    🔥 The fastest way to learn Ionic: ionicacademy.com/
    #############################
    ❤️ You can also find me on:
    Instagram: / simongrimm_
    Twitter: / schlimmson
    Facebook: / devdactic
    TikTok: / simongrimm_
    Or join the Simonics Facebook group:
    / simonics
    #############################
  • НаукаНаука

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

  • @galaxies_dev
    @galaxies_dev  10 месяцев назад

    Learn React Native FAST by becoming a member of Galaxies.dev today [FREE] galaxies.dev/reactnative

  • @pietrodeveloper
    @pietrodeveloper 9 месяцев назад +5

    I read on react native docs that .env are not secure, they are being stored unencrypted in memory so they can be easily read with debuggers.
    My 3 favorite setups are: 1) Store in the code with API encrypted and use backend for decrypt with for example AWS KMS. 2) Use secret manager behind a proxy like an AWS http gateway to get the API and implement functions in the front end. Or 3) Use proxy like an http gateway with user authorization that will trigger functions in the backend like AWS Lambda or Firebase functions, so if you see the code you will just see a fetch to an URL you can't access.

  • @rgarafulicm
    @rgarafulicm 11 месяцев назад +4

    This can have an awesome follow up video about implementing that proxy in nodejs with a ionic project! Please do that!!

  • @dalanxd
    @dalanxd 10 месяцев назад +2

    Great vid, man, thx so much for the content

  • @FahimAhmed-gb2zo
    @FahimAhmed-gb2zo 11 месяцев назад

    Hello simon , Hope you are well . I want to know that , Can i create the Uploading progessbar (which one give me the uploading progress % )by using this plugin ? Capacitor local notification.

  • @chrgeorgeson
    @chrgeorgeson 7 месяцев назад

    Couldn't you store the api key or any encryption keys the app might be issued in Keychain?

  • @irfanbabar8424
    @irfanbabar8424 11 месяцев назад

    Pretty awesome and informative. I have learned about secret managers, didn't implement any yet. but I think they will be kind of replacement for .env file. What do you think?

    • @galaxies_dev
      @galaxies_dev  11 месяцев назад

      Haven't used them but I think they could work!

  • @Meliovation
    @Meliovation 11 месяцев назад

    Excellent reminder to be aware! Question - how does the environment files (like in Angular) protect the API keys? I assume a hacker can still get the API key by monitoring the network HTTP call to the API (like you can do in Chrome). Is the env file only used to prevent committing the API keys to github? Thanks!

    • @galaxies_dev
      @galaxies_dev  11 месяцев назад

      The Angular env is a pure naming convention - it’s actually like any other TS file and bundle with your app. The name is confusing, it is not related to a .env file used in Server environments!

    • @Meliovation
      @Meliovation 11 месяцев назад

      @@galaxies_dev That IS confusing! I assumed (was hoping) that some magic was happening in terms of security with Angular but it didn't seem like anything was happening. Other than the advice to add the .env files to gitignore.

    • @alexkode
      @alexkode 11 месяцев назад

      @@galaxies_dev So angular env files are not secure to store API keys right? They can still find it?

  • @user-tn2ht2pd1v
    @user-tn2ht2pd1v 11 месяцев назад

    Could you do a video for point 1-4 very interesting

  • @milothoxha2513
    @milothoxha2513 11 месяцев назад +1

    Pretty interesting... What would be the best way to store api keys and be hidden in the bundle?

    • @galaxies_dev
      @galaxies_dev  11 месяцев назад +2

      Don't have them at all in any client side code :)

  • @ibraaaa-tr5vk
    @ibraaaa-tr5vk 19 дней назад

    goated vid wallahi

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

    Was this not the same reason flash & AIR was crucified?

  • @ThomazMartinez
    @ThomazMartinez 11 месяцев назад +2

    How did you get vscode button in Finder?

    • @mimpelf8348
      @mimpelf8348 11 месяцев назад

      yeah, how?

    • @galaxies_dev
      @galaxies_dev  11 месяцев назад

      Check out this way: flaviocopes.com/how-to-add-an-open-in-vs-code-icon-in-macos-finder/

  • @swp44744
    @swp44744 11 месяцев назад

    What you think of expo secure store for RN app?

    • @galaxies_dev
      @galaxies_dev  11 месяцев назад

      It's good - but won't help for stuff like API keys as you would still have to add them to your codebase and write them to secure storage. More useful for stuff like auth tokens!

  • @domthefounder
    @domthefounder 2 месяца назад

    I think my default AWS amplify is secure in this way

  • @tclark
    @tclark 11 месяцев назад +2

    That Visual Studio code icon tho! How?

    • @galaxies_dev
      @galaxies_dev  11 месяцев назад

      I think I used a Github script a while ago, but here's a tutorial how you can add a simple automation to make it work: flaviocopes.com/how-to-add-an-open-in-vs-code-icon-in-macos-finder/

    • @tclark
      @tclark 11 месяцев назад

      @@galaxies_dev Cool, thanks mate!

  • @try-new-game
    @try-new-game 8 месяцев назад

    Thank you for the good video.
    Currently, I only use the server API address(domain).The .env file is in use.
    Thinking of using the server profile (dev or prod)
    getting the API address from the mysql and dynamically assigning it to react-native-config.
    What do you think?

    • @galaxies_dev
      @galaxies_dev  8 месяцев назад +1

      I haven't done that, but only revealing a URL shouldn't be a problem in general!

    • @successhycenth
      @successhycenth 8 месяцев назад

      @@galaxies_dev What about secret keys and what are your thoughts about this react native keychain libraries available everywhere?

  • @edge0601
    @edge0601 3 месяца назад

    This is what imposter syndrome i have thanks react native is making me happy and sad at same time

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

    Progurd left the chat

  • @HackHeyner
    @HackHeyner 11 месяцев назад

    [nervous laugh] ha..ha...ha.... of course it is....

  • @prifysports7654
    @prifysports7654 5 месяцев назад

    Like, can't google fix this mess themself?

    • @UnchartedWorlds
      @UnchartedWorlds 3 месяца назад

      they have: Android Play Integrity API, its just that Expo and react native do not offer you an easy way to call Play Integrity API from your app. I'm researching this my self, and its not easy to find much information how to setup react native app with "Android Play Integrity API" which will help you protect your backend being abused by impostors pretending to be your app

  • @shawqidia5587
    @shawqidia5587 11 месяцев назад

    Hi Simon, is there an email I contact you at