Giter Club home page Giter Club logo

react-native-secure-storage's People

Contributors

matthewdking avatar oyyq99999 avatar thymikee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-secure-storage's Issues

Is it normal that getAllItems does not prompt user to scan biometrics?

I did write the code which is

async function doSomething() {
const protectedData = await SInfo.getAllItems({
sharedPreferencesName: 'onSharedPrefs',
keychainService: 'onKeychain',
touchID: true,
showModal: true, //required (Android) - Will prompt user's fingerprint on Android
strings: {
// optional (Android) - You can personalize your prompt
description: 'Unlock your privatekey ',
header: 'Need Your Biometry Permission',
},
// required (iOS) - A fallback string for iOS
kSecUseOperationPrompt:
'We need your permission to retrieve encrypted data',
});
console.log('Value', protectedData);
}

but I also retrieved all key/value from getAllKeys without proving any biometrics on Android Device.

Gradle Error: Could not find com.android.tools.build:gradle:4.1.0.

I am getting a new error (after a few months away from my project) that seems to point to react-native-secure-storage and a Gradle dependency. Here is the full error text:

Could not find com.android.tools.build:gradle:4.1.0.
Searched in the following locations:

The location it's searching in is not there, but I don't know where else to change it. I haven't had any luck with Android Studio updates helping, so I thought I would check here, as it seems to be this project that has that requirement.

Repeated touch ID prompts when accessing storage

I'm using your library in my project and it's fantastic! I've noticed a quirk however and I can't figure out why it's occurring. Whenever I write to the storage, touch authentication is always requested. We use touch to unlock our app and then we write to storage, so we get 2 touch id requests one after the other.

We're using it in our password manager that has an iOS extension for password autofill, and you can see the configs here and here (2 different uses of the storage).

We've tried seeing accessControl to null is in #6, but it still prompts us. The authenticationPrompt property seems to have no affect on what's displayed.

Have you seen this issue before? It's really bewildering us.

Not working in iOS simulator

I was not able to get this to work in iOS simulator. I'm finding that all code execution stops at...

await SecureStorage.setItem(key, str, config)

To install, I used...

npm install react-native-secure-storage --save
react-native link react-native-secure-storage

8 duplicate symbols for architecture x86_64

Hi.

It seems like this module is not compatible with react-native-keychain. As soon as I install and link this module in RN > 0.60, I see this error while building for iOS:

duplicate symbol '_authPolicy' in:
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNKeychain/libRNKeychain.a(RNKeychainManager.o)
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNSecureStorage/libRNSecureStorage.a(RNSecureStorage.o)
duplicate symbol '_messageForError' in:
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNKeychain/libRNKeychain.a(RNKeychainManager.o)
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNSecureStorage/libRNSecureStorage.a(RNSecureStorage.o)
duplicate symbol '_codeForError' in:
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNKeychain/libRNKeychain.a(RNKeychainManager.o)
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNSecureStorage/libRNSecureStorage.a(RNSecureStorage.o)
duplicate symbol '_rejectWithError' in:
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNKeychain/libRNKeychain.a(RNKeychainManager.o)
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNSecureStorage/libRNSecureStorage.a(RNSecureStorage.o)
duplicate symbol '_accessGroupValue' in:
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNKeychain/libRNKeychain.a(RNKeychainManager.o)
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNSecureStorage/libRNSecureStorage.a(RNSecureStorage.o)
duplicate symbol '_accessControlValue' in:
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNKeychain/libRNKeychain.a(RNKeychainManager.o)
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNSecureStorage/libRNSecureStorage.a(RNSecureStorage.o)
duplicate symbol '_accessibleValue' in:
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNKeychain/libRNKeychain.a(RNKeychainManager.o)
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNSecureStorage/libRNSecureStorage.a(RNSecureStorage.o)
duplicate symbol '_serviceValue' in:
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNKeychain/libRNKeychain.a(RNKeychainManager.o)
    /Users/sallar/Library/Developer/Xcode/DerivedData/Buttercup-aewhavlbvgapuwgsvqodosvrulab/Build/Products/Debug-iphonesimulator/RNSecureStorage/libRNSecureStorage.a(RNSecureStorage.o)
ld: 8 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thank you.

Problem on real devices

I am currently trying react-native-secure-storage and run into the following issue. On my local system everything runs fine but when running on a real device the call to setItem fails with the error message The user name or passphrase you entered is not correct.

My config:

const authSecureConfig = {
    accessControl: ACCESS_CONTROL.BIOMETRY_ANY_OR_DEVICE_PASSCODE,
    accessible: ACCESSIBLE.WHEN_UNLOCKED,
    authenticationPrompt: 'continue using qroll',
    service: 'qroll',
    authenticateType: AUTHENTICATION_TYPE.DEVICE_PASSCODE_OR_BIOMETRICS,
};

My code that throws the error:

await SecureStorage.setItem('auth0-refresh-token', credentials.refreshToken, authSecureConfig);

I do not get any popups or any other form of dialog to enter anything. Any ideas what this could be caused by? The iPad I am testing on has no TouchId but is secured with a passcode.

Update ReadMe

Update ReadMe for Android

import li.yunqi.RNSecureStoragePackage; -> import li.yunqi.rnsecurestorage.RNSecureStoragePackage;

Could not find com.android.tools:common:25.3.3.

Seeing the following error trying to run an android build.

A problem occurred configuring project ':react-native-secure-storage'.

Could not resolve all files for configuration ':react-native-secure-storage:classpath'.

Could not find com.android.tools:common:25.3.3.

 Searched in the following locations:

     https://jcenter.bintray.com/com/android/tools/common/25.3.3/common-25.3.3.pom

     https://jcenter.bintray.com/com/android/tools/common/25.3.3/common-25.3.3.jar

 Required by:

     project :react-native-secure-storage > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3

     project :react-native-secure-storage > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.build:manifest-merger:25.3.3

     project :react-native-secure-storage > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.ddms:ddmlib:25.3.3

     project :react-native-secure-storage > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.analytics-library:shared:25.3.3

     project :react-native-secure-storage > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.analytics-library:tracker:25.3.3

     project :react-native-secure-storage > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools.layoutlib:layoutlib-api:25.3.3

     project :react-native-secure-storage > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools:dvlib:25.3.3

     project :react-native-secure-storage > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools:repository:25.3.3

Crash on Android 5 - Proguard

While using this app on Android L (5) devices, our app crashes:

No pending exception expected: java.lang.NoSuchFieldError: no "J" field "mCtxPtr" in class "Lcom/facebook/crypto/cipher/NativeGCMCipher;" or its superclasses

I could mitigate this crash by adding this proguard rule:
-keep class com.facebook.crypto.** { *; }

I wonder, what are the correct proguard rules as it appears they are not shipped with the library?

Just doesn't work

Everytime I set a key, when I try to retrieve it, it shows undefined. Tried several times, many different ways. no luck.

image

Typescript Support

I'm getting the following error when trying to import the module.
Could not find a declaration file for module 'react-native-secure-storage'. '/Users/christopherreeves/MyKasuMobileV3/node_modules/react-native-secure-storage/index.js' implicitly has an 'any' type.   Try npm i --save-dev @types/react-native-secure-storage if it exists or add a new declaration (.d.ts) file containing declare module 'react-native-secure-storage';

Will this module have Typescript support?

MultiGet support ?

Hi!
Can you provide the method MultiGet like 'react-native/AsyncStorage' ?

WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'. It will be removed at the end of 2019.

WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
REASON: Called from: ~/project/node_modules/react-native-secure-storage/android/build.gradle:97
WARNING: Debugging obsolete API calls can take time during configuration. It's recommended to not keep it on at all times.
Affected Modules: react-native-secure-storage

Datastorage on uninstalling the app

Hi ,
I am working with android. Does this api store data after the app in uninstalled. So that I can use the data when the app is installed next time?

Thanks!!

I can't clear the storage!

I am now using this component to save the user credentials after login.
In the development, I want to remove the storage and like I did with Storage component of react native, I simply removed the app from the phone and installed it again.
But it's still having the credentials in the storage.
Is there anyway to clear that ?

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.