MCPcopy
hub / github.com/MiniMax-AI/cli / pickAuthMethod

Function pickAuthMethod

src/auth/setup.ts:64–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62}
63
64export async function pickAuthMethod(): Promise<AuthChoice['value']> {
65 const { select, isCancel } = await import('@clack/prompts');
66 const value = await select({
67 message: 'How would you like to authenticate?',
68 options: AUTH_CHOICES.map(c => ({ value: c.value, label: c.label })),
69 });
70 if (isCancel(value)) throw new CLIError('Authentication cancelled.', ExitCode.AUTH);
71 return value as AuthChoice['value'];
72}
73
74/**
75 * Region-only picker used by `mmx auth login --recommend` (no API-key option).

Callers 2

runFunction · 0.90
ensureAuthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected