fix(auth): allow retrying unavailable second-factor interfaces (#1549)

This commit is contained in:
ZacharyZcR authored and GitHub committed 2026-10-03 21:03:13 +08:00
1 parent c66702deb1
commit c9a1348836
6 files changed
+79 -7

No files matched your search

+6 -1
View File
@@ -449,7 +449,9 @@ async function fetchPreLoginPlugins(): Promise<PluginSummary[]> {
* factors) before anyone has signed in. After sign-in the full runtime
* reconciles, keeping these active when their bundle has not changed.
*/
export async function startPreLoginPlugins(): Promise<void> {
export async function startPreLoginPlugins(
options: { retryFailed?: boolean } = {},
): Promise<void> {
installPluginHostBridge();
let list: PluginSummary[];
try {
@@ -468,6 +470,9 @@ export async function startPreLoginPlugins(): Promise<void> {
// subset would unload everything else. Auth remounts during the
// post-login fade, so this runs after sign-in every time.
if (started) return;
if (options.retryFailed) {
for (const plugin of list) failedVersions.delete(plugin.id);
}
await reconcile(list);
markPluginsSettled();
});