Chores: format chutes oauth
This commit is contained in:
committed by
Peter Steinberger
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;
|
||||||
|
|||||||
Reference in New Issue
Block a user