Skip to content

armgit / ente

Public Imported from GitHub
0

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

[auth] Prevent auto-logout on max failed attempts for offline users

AmanRajSinghMouryad0bc513e52fd
diff --git a/mobile/packages/lock_screen/lib/ui/lock_screen.dart b/mobile/packages/lock_screen/lib/ui/lock_screen.dart
index 3ffa552274..c8db507457 100644
--- a/mobile/packages/lock_screen/lib/ui/lock_screen.dart
+++ b/mobile/packages/lock_screen/lib/ui/lock_screen.dart
@@ -345,7 +345,8 @@ class _LockScreenState extends State<LockScreen> with WidgetsBindingObserver {
_lockscreenSetting.getInvalidAttemptCount()) {
invalidAttemptCount = _lockscreenSetting.getInvalidAttemptCount();
- if (invalidAttemptCount > 9) {
+ // For logged-in users, auto-logout after 10 failed attempts
+ if (invalidAttemptCount > 9 && widget.config.isLoggedIn()) {
await _autoLogoutOnMaxInvalidAttempts();
return;
}