mogol / flutter_secure_storage

A Flutter plugin to store data in secure storage
https://pub.dartlang.org/packages/flutter_secure_storage
BSD 3-Clause "New" or "Revised" License
1.12k stars 367 forks source link

Implementing encryption with the same logic as FlutterSecureStorage #697

Closed aliaksei-liavonik closed 1 month ago

aliaksei-liavonik commented 5 months ago

Hello! I'm transitioning an application to Flutter and need to ensure seamless user session continuity by writing encrypted session tokens to local storage, readable by the new Flutter app. The old app, built with a different technology, writes encrypted session tokens that must be accessible by the new Flutter app(after transition), replacing it without requiring users to re-authenticate. This requires encrypting new tokens in a manner compatible with FlutterSecureStorage. I'm seeking guidance on achieving encryption compatibility between the two applications, specifically for session token encryption and storage.

So what I'm looking for is a way to encrypt the session token with JS as flutterSecureStorage.write(key, value) does in Flutter?

aliaksei-liavonik commented 5 months ago

Just to extend what I want to do:

  1. There is working app on the example.domain
  2. I want to push to example.domain the new application(in other words migrate to the new version of the app) which will try to read token with FlutterSecureStorage and will automatically login users with this token

So I guess I need to find out do I able to use some webCrypto function to encrypt the same way and where I can get public key which is used by the package. Fix me if I'm wrong and it's more complicated then I see it.

Daniel-Cong commented 5 months ago

Seconded this for other kind of reason. This package hasn't been updated for 7 months, and it hinders my packages upgrades. It would be great if the author shared it in human language, how can we encrypt and decrypt values securely before we store them in shared_preferences, before he abandons the project for good.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity.

juliansteenbakker commented 1 month ago

I am closing all older issues. If this issue still exists in the latest version, please let me know.