Skip to content

armgit / ente

Public Imported from GitHub
0

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

[auth] Handle null value

Neeraj Gupta529666545190
diff --git a/auth/lib/services/user_service.dart b/auth/lib/services/user_service.dart
index f123fdf1b0..194b22bf45 100644
--- a/auth/lib/services/user_service.dart
+++ b/auth/lib/services/user_service.dart
@@ -380,7 +380,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) {
@@ -692,7 +693,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"];
}
Configuration.instance.setVolatilePassword(userPassword);