25-09-22/1

This commit is contained in:
Hamza-Ayed
2025-09-22 17:28:19 +03:00
parent 13d77e118c
commit 7595be8067
19 changed files with 536 additions and 246 deletions

View File

@@ -182,13 +182,13 @@ class LoginController extends GetxController {
loginUsingCredentials(String passengerID, email) async {
isloading = true;
update();
bool isTokenExpired = JwtDecoder.isExpired(
r(box.read(BoxName.jwt)).toString().split(AppInformation.addd)[0]);
// bool isTokenExpired = JwtDecoder.isExpired(
// r(box.read(BoxName.jwt)).toString().split(AppInformation.addd)[0]);
if (isTokenExpired) {
// Log.print('isTokenExpired loginUsingCredentials: ${isTokenExpired}');
await getJWT();
}
// if (isTokenExpired) {
// // Log.print('isTokenExpired loginUsingCredentials: ${isTokenExpired}');
// await getJWT();
// }
var res =
await CRUD().get(link: AppLink.loginFromGooglePassenger, payload: {

View File

@@ -94,6 +94,14 @@ class OtpVerificationController extends GetxController {
[],
'cancel.wav',
);
CRUD().post(
link:
'${AppLink.seferPaymentServer}/auth/token/update_passenger_token.php',
payload: {
'token': box.read(BoxName.tokenDriver).toString(),
'fingerPrint': finger.toString(),
'passengerID': box.read(BoxName.passengerID).toString(),
});
Get.offAll(() => const MapPagePassenger());
} else {
Get.snackbar('Verification Failed', 'OTP is incorrect or expired');