Chores: format chutes oauth
parent
4efb5cc18e
commit
0aba911912
|
|
@ -110,4 +110,3 @@ describe("loginChutes", () => {
|
||||||
expect(creds.email).toBe("manual-user");
|
expect(creds.email).toBe("manual-user");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue