refactor: migrate JWT storage to secure storage, update assets, and enhance login verification logic.
This commit is contained in:
@@ -479,8 +479,7 @@ class AI extends GetxController {
|
||||
bool isLoadingVehicleFrontSy = false;
|
||||
bool isLoadingVehicleBackSy = false;
|
||||
Future<void> sendToAI(String type, {required File imageFile}) async {
|
||||
final _jwt = box.read(BoxName.jwt);
|
||||
final String _token = _jwt != null ? r(_jwt).split(AppInformation.addd)[0] : '';
|
||||
final String _token = await storage.read(key: BoxName.jwt) ?? '';
|
||||
final headers = {
|
||||
'Authorization': 'Bearer $_token',
|
||||
'X-HMAC-Auth': '${box.read(BoxName.hmac)}',
|
||||
|
||||
Reference in New Issue
Block a user