diff --git a/lib/screens/auth_screen.dart b/lib/screens/auth_screen.dart index 79c0db91..65f9eefc 100644 --- a/lib/screens/auth_screen.dart +++ b/lib/screens/auth_screen.dart @@ -50,8 +50,10 @@ class _AuthScreenState extends State { try { // Fetch all servers for this user final servers = await _authService.fetchServers(plexToken); + final storage = await StorageService.getInstance(); if (servers.isEmpty) { + await storage.clearCredentials(); setState(() { _isAuthenticating = false; _errorMessage = t.serverSelection.noServersFound; @@ -60,7 +62,6 @@ class _AuthScreenState extends State { } // Save all servers to registry and enable them - final storage = await StorageService.getInstance(); final registry = ServerRegistry(storage); await registry.saveServers(servers);