pradeep1991singh / cordova-plugin-secure-key-store

Cordova plugin for securely saving keys, passwords or strings on devices.
MIT License
25 stars 29 forks source link

Ios getting last stored value and replace all other key value with last stored value #8

Closed Krishna25Vrinsoft closed 7 years ago

Krishna25Vrinsoft commented 7 years ago

In ios i have stored 2 value first store app_id (key), and value is 12345. and second value stored as pass user_pass (key) and value is 12345_pass. when i close app and again open i am getting both key with 12345_pass as value. I am try to solve but i am not getting any solution. Can you plz help us to solve out this issue.

Thanks.

pradeep1991singh commented 7 years ago

@Krishna25Vrinsoft please share device details.

parthdevmurari91 commented 7 years ago

/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */

import "SecureKeyStore.h"

import <Cordova/CDV.h>

@implementation SecureKeyStore

@end

================================================================= Replace SecureKeyStore.m file with above code

Krishna25Vrinsoft commented 7 years ago

@pradeep1991singh Is this correct? If it's correct than can you please update plugin?

pradeep1991singh commented 7 years ago

@parthdevmurari91 It seems your solution is not using keychainWrapper, it just using NSUserDefaults which is not recommended to use for sensitive data.

pradeep1991singh commented 7 years ago

@Krishna25Vrinsoft Use latest release v1.5.0 that should fix the issue. And let me know if you still facing same issue. Thanks.