Giter Site home page Giter Site logo

Comments (6)

Parrryy avatar Parrryy commented on July 22, 2024 3

Hey, ideally we don't want to store the username and password combo on the device, but an encrypted token. From what I've seen this library is referenced as the secure solution to store the token but I can't see anywhere on the library of an example of how to do this.

Currently, I'm toying with the idea of using the setGenericPassword with the username and token combination and explaining this in the code comments however it doesn't seem like the best solution. Any thoughts on this? I feel a setAuthToken or something similar may be beneficial with a good example? Has anyone stored an auth token using this library.

from react-native-keychain.

sauhardar avatar sauhardar commented on July 22, 2024 3

Agreed here! Any updates on this?

from react-native-keychain.

vonovak avatar vonovak commented on July 22, 2024 1

sorry, it's not possible, from the android code:

if (username == null || username.isEmpty() || password == null || password.isEmpty()) {
            Log.e("KeychainModule", "you passed empty or null username/password");
            callback.invoke("KeychainModule: you passed empty or null username/password");
            return;
        }

but seems weird you would only need to store a token, there ought to be somethign the token belongs to. anyways, if not, you can just make up some other string

from react-native-keychain.

chenxsan avatar chenxsan commented on July 22, 2024

@vonovak Thanks. Might need to reconsider my authenticate policy :).

from react-native-keychain.

NishantDesai1306 avatar NishantDesai1306 commented on July 22, 2024

any updates, with storing just a single token ? I am using my web server's Restful API in my mobile app so when user logs in the server sends an access token which I want to store using this lib. Is there any other way to store that right now or do I have to just use some string (probably app name) as username and token as password ?

from react-native-keychain.

rogierslag avatar rogierslag commented on July 22, 2024

We'd also love this addition! Right now we save the username as some random string, but developer intent would be communicated more clearly with a specific API call

from react-native-keychain.

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.