Coder Social home page Coder Social logo

Comments (7)

oferRounds avatar oferRounds commented on July 4, 2024

One good option IMO is to use: https://github.com/oblador/react-native-keychain

from react-native-azure-auth.

vmurin avatar vmurin commented on July 4, 2024

Hi @oferRounds

  • on one side you have referenced article about much more insecure localStorage not AsyncStorage ;)
  • on other side you are absolutely right - AsyncStorage is unencrypted storage and if your device is stolen and has unencrypted disk some one can access the file system and read the values in store.
    But AsyncStorage is secure enough if you did not loos your device. It means - it can not be accessed from another app.
  • I will consider to switch to more secure storage

from react-native-azure-auth.

oferRounds avatar oferRounds commented on July 4, 2024

Yes, you are right - I referenced it as related to storing token on a client in general, in an unencrypted way
I wasn’t aware that localStorage is a lot worse (Coming from the native mobile in my roots, not from the web)
Anyhow, thanks! Sounds good

from react-native-azure-auth.

vmurin avatar vmurin commented on July 4, 2024

localStorage is a part of web browser API, it is not bound to any mobile app and there are many known attack ways to access data in localStorage, that does not meant to be accessible by anyone except owner.

In contrary AsyncStorage is a React Native feature backed under the hood by different native storage types on iOS and Android. It is not accessible from other apps, it is bound to your app, i.e. it will be cleared (the related part of it) if the app has being uninstalled.
So in a some way it is secure ;)

Anyway it is recommended to use something like react-native-keychain for a sensible data like tokens as you wrote.

Thanks for pointing this out!

from react-native-azure-auth.

oferRounds avatar oferRounds commented on July 4, 2024

Got you @vmurin, good to learn this info about the localStorage

And thanks for always welcoming the feedback!

from react-native-azure-auth.

josethz00 avatar josethz00 commented on July 4, 2024

I read the discussion, and I think I will switch from AsyncStorage to Keychain, but I am concerned about performance. Is Keychain's performance similar to Async Storage?

from react-native-azure-auth.

vmurin avatar vmurin commented on July 4, 2024

I did't googled for performance comparison between AsyncStorage and Keychain. But I suppose the performance in this case is not an issue. All network response times during auth process are much bigger.

from react-native-azure-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.