earendil-works/pi · error · Error

Unknown ${options.name} sign-in method: ${loginMethod}

Error message

Unknown ${options.name} sign-in method: ${loginMethod}

What it means

Error "Unknown ${options.name} sign-in method: ${loginMethod}" thrown in earendil-works/pi.

Source

Thrown at packages/ai/src/auth/oauth/radius.ts:383

				type: "select",
				message: `Sign in to ${options.name}:`,
				options: [
					{ id: LOGIN_METHOD_BROWSER, label: "Sign in with browser (recommended)" },
					{
						id: LOGIN_METHOD_DEVICE_CODE,
						label: "Sign in with device code (when signing in from another device)",
					},
				],
			});

			if (loginMethod === LOGIN_METHOD_DEVICE_CODE) {
				return loginWithDeviceCode(gateway, interaction);
			}
			if (loginMethod === LOGIN_METHOD_BROWSER) {
				const discovery = await loadRadiusOAuthDiscovery(gateway, interaction.signal);
				return loginWithBrowser(gateway, discovery.authorizationEndpoint, interaction);
			}
			throw new Error(`Unknown ${options.name} sign-in method: ${loginMethod}`);
		},

		async refresh(credential, signal): Promise<OAuthCredential> {
			const refreshed = await requestOAuthToken(
				gateway,
				new URLSearchParams({
					grant_type: "refresh_token",
					client_id: OAUTH_CLIENT_ID,
					refresh_token: credential.refresh,
				}),
				signal,
			);
			return refreshed;
		},

		async toAuth(credential) {
			return { apiKey: credential.access };
		},

View on GitHub (pinned to 4af9d21d3b)

Solutions

  1. Use a supported sign-in method for the provider.

When it happens

Trigger: Thrown at packages/ai/src/auth/oauth/radius.ts:383 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of earendil-works/pi@4af9d21d3b (2026-08-24). Data as JSON: /api/errors/bb881e2a77ec2e0f. Report an issue: GitHub.