can1357/oh-my-pi · error

No OAuth providers registered

Error message

No OAuth providers registered

What it means

`pickProviderInteractively` renders a numbered menu of registered OAuth providers for interactive login. It throws immediately when the provider list is empty, because there is nothing to present or select and the login flow cannot possibly succeed. This is a guard against prompting with zero options.

Source

Thrown at packages/coding-agent/src/cli/auth-broker-cli.ts:353

		}
	};

	if (supportsRawMode) {
		readline.emitKeypressEvents(input, rl);
		input.setRawMode(true);
		input.on("keypress", onKeypress);
	}

	rl.once("SIGINT", onSigint);
	rl.question(question, answer => {
		finish(() => resolve(answer));
	});
	return promise;
}

async function pickProviderInteractively(providers: readonly OAuthProviderInfo[]): Promise<string> {
	if (providers.length === 0) {
		throw new Error("No OAuth providers registered");
	}
	const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
	try {
		process.stdout.write("Select a provider:\n\n");
		for (let i = 0; i < providers.length; i++) {
			process.stdout.write(`  ${i + 1}. ${providers[i].name}\n`);
		}
		process.stdout.write("\n");
		const choice = await promptLine(rl, `Enter number (1-${providers.length}): `);
		const index = Number.parseInt(choice, 10) - 1;
		if (Number.isNaN(index) || index < 0 || index >= providers.length) {
			throw new Error(`Invalid selection: ${choice}`);
		}
		return providers[index].id;
	} finally {
		rl.close();
	}
}

View on GitHub (pinned to 9690622007)

Solutions

  1. Register/configure at least one OAuth provider before running `omp auth-broker login`.
  2. Pass an explicit provider id (`--provider=<id>`) so the interactive picker is skipped.
  3. Check provider registration/loading logs for errors that dropped all providers.

Example fix

// before
omp auth-broker login            // zero providers registered
// after
omp auth-broker login --provider=anthropic
Defensive patterns

Strategy: validation

Validate before calling

import { listOAuthProviders } from "./auth";
const providers = await listOAuthProviders();
if (providers.length === 0) {
  console.error("No OAuth providers registered; configure one before login.");
  process.exit(1);
}
await runLogin(flags);

Try / catch

try {
  await runLogin(flags);
} catch (err) {
  if (err instanceof Error && err.message === "No OAuth providers registered") {
    console.error("Configure at least one OAuth provider before running login.");
  } else throw err;
}

Prevention

When it happens

Trigger: Calling `omp auth-broker login` without a `--provider` id, so `runLogin` reaches `pickProviderInteractively`, while the registered provider list is empty (no provider plugins/config loaded, or all providers filtered out).

Common situations: Fresh install with no OAuth providers configured; a CI/container environment that excludes all providers; broken provider registration/loading that silently yields an empty list.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/6e63e71e662cd5e0. Report an issue: GitHub.