feat(auth): Prevent tool selection after logout and improve state management

This commit is contained in:
cogwheel0
2025-12-05 13:01:17 +05:30
parent 1ad43d372a
commit 5cbef38687
3 changed files with 13 additions and 0 deletions

View File

@@ -10,6 +10,7 @@ import 'token_validator.dart';
import 'auth_cache_manager.dart';
import '../utils/debug_logger.dart';
import '../utils/user_avatar_utils.dart';
import '../../features/tools/providers/tools_providers.dart';
part 'auth_state_manager.g.dart';
@@ -786,6 +787,7 @@ class AuthStateManager extends _$AuthStateManager {
// Invalidate all auth-related providers to clear cached data
ref.invalidate(activeServerProvider);
ref.invalidate(serverConfigsProvider);
ref.invalidate(toolsListProvider);
// Clear auth cache manager
_cacheManager.clearAuthCache();