Skip to content

Commit

Permalink
try to fix secure storage issues
Browse files Browse the repository at this point in the history
ref #523
  • Loading branch information
dreautall committed Feb 7, 2025
1 parent a5f914c commit 0287dbe
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="Waterfly III" android:name="${applicationName}" android:icon="@mipmap/ic_launcher" android:enableOnBackInvokedCallback="true" android:usesCleartextTraffic="true" android:networkSecurityConfig="@xml/network_security_config">

<application
android:name="${applicationName}"
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="Waterfly III"
android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="true">
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop" android:taskAffinity="" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
Expand Down
6 changes: 6 additions & 0 deletions android/app/src/main/res/xml/backup_rules.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<exclude
domain="sharedpref"
path="FlutterSecureStorage" />
</full-backup-content>
4 changes: 3 additions & 1 deletion lib/auth.dart
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,9 @@ class FireflyService with ChangeNotifier {
late TimeZoneHandler tzHandler;

final FlutterSecureStorage storage = const FlutterSecureStorage(
aOptions: AndroidOptions(),
aOptions: AndroidOptions(
resetOnError: true,
),
);

final Logger log = Logger("Auth.FireflyService");
Expand Down

0 comments on commit 0287dbe

Please sign in to comment.