# webview_storage_demo **Repository Path**: jiodg45/webview_storage_demo ## Basic Information - **Project Name**: webview_storage_demo - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-26 - **Last Updated**: 2021-07-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # webview_cookie_demo A new Flutter project. ## Spike share Cookie to Browser app - Use the cookie manager share cookie to browser app For iOS device use the default [WKWebsiteDataStore](https://developer.apple.com/documentation/webkit/wkwebsitedatastore/) could share the cookie to safari browser, html cookie storage could access it under the special domain ✅ ![img](./images/ios_cookie.png) For android device use the default [CookieManager](https://developer.android.google.cn/reference/kotlin/android/webkit/CookieManager) could not share the cookie html. ❌ ![img](./images/android_cookie.png) ## Suggest solution Use aes encrpty the usid, pass to html exmaple action from buff `https://domain/path?openType=openInBrowser&usid=` url that open with browser `https://domain/path?openType=openInBrowser&usid={encripty usid}` ## encrypt refer to: https://pub.flutter-io.cn/packages/encrypt ```dart import 'package:encrypt/encrypt.dart'; void main() { final plainText = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'; final key = Key.fromUtf8('my 32 length key................'); final iv = IV.fromLength(16); final encrypter = Encrypter(AES(key)); final encrypted = encrypter.encrypt(plainText, iv: iv); final decrypted = encrypter.decrypt(encrypted, iv: iv); print(decrypted); // Lorem ipsum dolor sit amet, consectetur adipiscing elit print(encrypted.base64); // R4PxiU3h8YoIRqVowBXm36ZcCeNeZ4s1OvVBTfFlZRdmohQqOpPQqD1YecJeZMAop/hZ4OxqgC1WtwvX/hP9mw== } ```