GithubHelp home page GithubHelp logo

Comments (10)

sureshprokraya avatar sureshprokraya commented on August 12, 2024 2

from flutter_secure_storage.

huvi8161 avatar huvi8161 commented on August 12, 2024 2

I have the same problem.

from flutter_secure_storage.

sureshprokraya avatar sureshprokraya commented on August 12, 2024

class SecureStorage {
// Create storage
late FlutterSecureStorage _storage;

static final SecureStorage _instance = SecureStorage._internal();

factory SecureStorage() {
return _instance;
}

SecureStorage._internal() {
_storage = FlutterSecureStorage();
}

// Read value
Future isSet({required String key}) async {
var val = await _storage.containsKey(key: key);
return val;
}

// Read value
Future readSecureData({required String key}) async {
var readData = await _storage.read(key: key);
return readData;
}

// Read all values
Future readAllSecureData() async {
Map<String, String> allValues = await _storage.readAll();
return allValues;
}

// Write value
Future writeSecureData({required String key, required String value}) async {
var writeData =
await _storage.write(key: key, value: value);
return writeData;
}

// Delete value
Future deleteSecureData({required String key}) async {
var deleteData = await _storage.delete(key: key);
return deleteData;
}

// Delete value
Future deleteAllSecureData() async {
var deleteData = await _storage.deleteAll();
return deleteData;
}
}
//This is I am using in my app, but still issue is not fixed.

from flutter_secure_storage.

sureshprokraya avatar sureshprokraya commented on August 12, 2024

I am updated secure storage v9.0.0 to v9.2.2, then again same issue:
I got this Error after app close and reopen:

PlatformException(Unexpected security result code, Code: -25300, Message: The specified item could not be found in the keychain., -25300, null)--

Please any one have solution for this.

from flutter_secure_storage.

sureshprokraya avatar sureshprokraya commented on August 12, 2024

Every time i am calling the Login API for token update, and deleting all Secure Stotage data, then again saving fresh data in secure storage.

So when ever reopen the application in IOS app,
When ever try to save data in secure storage below error occurred
How to solve this.

from flutter_secure_storage.

kkh975 avatar kkh975 commented on August 12, 2024

Same here, is there a size limit?

my code:

class LocalStorageServiceSecureImpl {
  late final FlutterSecureStorage _storage;

  LocalStorageServiceSecureImpl() {
    _storage = FlutterSecureStorage(
      iOptions: _getIOSOptions,
      aOptions: _getAndroidOptions,
    );
  }

  AndroidOptions get _getAndroidOptions =>
      const AndroidOptions(encryptedSharedPreferences: true);

  IOSOptions get _getIOSOptions => const IOSOptions(
        accessibility: KeychainAccessibility.first_unlock,
        synchronizable: true,
      );

  Future<void> saveData(String key, String data) async {
    await _storage.write(
      key: key,
      value: data,
      iOptions: _getIOSOptions,
      aOptions: _getAndroidOptions,
    );
  }

  Future<String?> loadData(String key) async {
    return await _storage.read(
      key: key,
      iOptions: _getIOSOptions,
      aOptions: _getAndroidOptions,
    );
  }
}

from flutter_secure_storage.

kieranmccwayleadr avatar kieranmccwayleadr commented on August 12, 2024

We have this issue along with the BadPaddingException: #541 I feel we need to personally remove the Flutter Secure Storage. It's causing weird issues. Might look into flutter_keychain @sureshprokraya what has been your experience so far using this package across android and ios?

from flutter_secure_storage.

rddewan avatar rddewan commented on August 12, 2024

value is always null

from flutter_secure_storage.

sureshprokraya avatar sureshprokraya commented on August 12, 2024

from flutter_secure_storage.

rddewan avatar rddewan commented on August 12, 2024

Look like it only support string as a value. I tries to store a int and got error but after storing as string its working

from flutter_secure_storage.

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.