Skip to content

armgit / ente

Public Imported from GitHub
0

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

Trim redundant recovery endpoint checks

Neeraj Gupta615e4ff92c75
diff --git a/mobile/apps/photos/lib/services/account/user_service.dart b/mobile/apps/photos/lib/services/account/user_service.dart
index d87a7e71a6..392d521826 100644
--- a/mobile/apps/photos/lib/services/account/user_service.dart
+++ b/mobile/apps/photos/lib/services/account/user_service.dart
@@ -908,9 +908,6 @@ class UserService {
sessionId: sessionID,
twoFactorType: type,
);
- if (client != _getAccountsClient()) {
- throw const AccountsError.sessionExpired();
- }
await dialog.hide();
if (!context.mounted) return;
// ignore: unawaited_futures
diff --git a/mobile/packages/accounts/lib/services/user_service.dart b/mobile/packages/accounts/lib/services/user_service.dart
index 1894b100eb..83f39a34e4 100644
--- a/mobile/packages/accounts/lib/services/user_service.dart
+++ b/mobile/packages/accounts/lib/services/user_service.dart
@@ -971,9 +971,6 @@ class UserService {
sessionId: sessionID,
twoFactorType: type,
);
- if (client != _getAccountsClient()) {
- throw const AccountsError.sessionExpired();
- }
await dialog.hide();
if (context.mounted) {
// ignore: unawaited_futures
diff --git a/web/packages/accounts/services/user.ts b/web/packages/accounts/services/user.ts
index 049f92c454..3ceb0cde15 100644
--- a/web/packages/accounts/services/user.ts
+++ b/web/packages/accounts/services/user.ts
@@ -434,9 +434,6 @@ export const getRecoverTwoFactor = async (
const response = TwoFactorRecoveryResponse.parse(
await getTwoFactorRecovery(client, twoFactorType, sessionID),
);
- if (client !== (await getAccountsClient())) {
- throw namedError("session_expired", "Server endpoint changed");
- }
return { client, response };
};