Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob] Handle null value

Neeraj Gupta7e9b3468d7a3
diff --git a/mobile/lib/services/user_service.dart b/mobile/lib/services/user_service.dart
index 027cd66736..2b50748e96 100644
--- a/mobile/lib/services/user_service.dart
+++ b/mobile/lib/services/user_service.dart
@@ -400,7 +400,8 @@ class UserService {
Widget page;
final String passkeySessionID = response.data["passkeySessionID"];
String twoFASessionID = response.data["twoFactorSessionID"];
- if (twoFASessionID.isEmpty) {
+ if (twoFASessionID.isEmpty &&
+ response.data["twoFactorSessionIDV2"] != null) {
twoFASessionID = response.data["twoFactorSessionIDV2"];
}
if (passkeySessionID.isNotEmpty) {
@@ -719,7 +720,8 @@ class UserService {
if (response.statusCode == 200) {
Widget page;
String twoFASessionID = response.data["twoFactorSessionID"];
- if (twoFASessionID.isEmpty) {
+ if (twoFASessionID.isEmpty &&
+ response.data["twoFactorSessionIDV2"] != null) {
twoFASessionID = response.data["twoFactorSessionIDV2"];
}
final String passkeySessionID = response.data["passkeySessionID"];