25-09-22/1
This commit is contained in:
@@ -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: {
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user