Chores: format chutes oauth

This commit is contained in:
Friederike Seiler
2026-01-11 15:51:03 +01:00
committed by Peter Steinberger
parent 4efb5cc18e
commit 0aba911912
2 changed files with 3 additions and 2 deletions

View File

@@ -110,4 +110,3 @@ describe("loginChutes", () => {
expect(creds.email).toBe("manual-user"); expect(creds.email).toBe("manual-user");
}); });
}); });

View File

@@ -41,7 +41,9 @@ async function waitForLocalCallback(params: {
}): Promise<{ code: string; state: string }> { }): Promise<{ code: string; state: string }> {
const redirectUrl = new URL(params.redirectUri); const redirectUrl = new URL(params.redirectUri);
if (redirectUrl.protocol !== "http:") { if (redirectUrl.protocol !== "http:") {
throw new Error(`Chutes OAuth redirect URI must be http:// (got ${params.redirectUri})`); throw new Error(
`Chutes OAuth redirect URI must be http:// (got ${params.redirectUri})`,
);
} }
const hostname = redirectUrl.hostname || "127.0.0.1"; const hostname = redirectUrl.hostname || "127.0.0.1";
const port = redirectUrl.port ? Number.parseInt(redirectUrl.port, 10) : 80; const port = redirectUrl.port ? Number.parseInt(redirectUrl.port, 10) : 80;