fix(auth): filter target.list() against loggedOutProviders for consistency

The list() trap now applies a final filter against loggedOutProviders,
matching the defensive approach used in the CLI layer. While target.logout()
removes entries from underlying storage, this prevents any edge case where
a logged-out provider could appear in list() results.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Timothy Laurent
2026-05-05 21:33:44 -07:00
parent 7724cadaf4
commit c82d7736da

View File

@@ -267,7 +267,7 @@ export function createFusionAuthStorage(): AuthStorage {
providers.add(p);
}
}
return Array.from(providers);
return Array.from(providers).filter((p) => !loggedOutProviders.has(p));
};
}