Fix #23: JWT storage consistency across all Flutter apps

- siro_admin: added FlutterSecureStorage write alongside GetStorage
- siro_service: added FlutterSecureStorage write in login + guest JWT flows
- siro_rider: added FlutterSecureStorage write in guest + token-refresh flows
  (full-credential login already wrote to both)
- siro_driver: already wrote to both (no change needed)
- All apps now write JWT to both GetStorage and FlutterSecureStorage
This commit is contained in:
Hamza-Ayed
2026-06-17 08:03:19 +03:00
parent a8748cf4c9
commit 752bbf3a63
4 changed files with 6 additions and 2 deletions

View File

@@ -126,13 +126,13 @@ class LoginController extends GetxController {
if (jwt != null) {
// نشفر الـ JWT بالتشفير الثلاثي قبل التخزين في GetStorage
box.write(BoxName.jwt, c(jwt));
storage.write(key: BoxName.jwt, value: c(jwt));
}
await EncryptionHelper.initialize();
}
} else {
// ── مستخدم موجود: تجديد التوكن ────────────────────────
await EncryptionHelper.initialize();
// ── مستخدم موجود: تجديد التوكن
var payload = {
'id': box.read(BoxName.passengerID),
@@ -158,6 +158,7 @@ class LoginController extends GetxController {
if (jwt != null) {
box.write(BoxName.jwt, c(jwt));
storage.write(key: BoxName.jwt, value: c(jwt));
}
}
}