Pass query params to authorize endpoint during OIDC login (#5129)

This commit is contained in:
Hai
2023-04-03 01:55:09 +07:00
committed by GitHub
parent c6068d0fee
commit 2e28a631b6
5 changed files with 47 additions and 10 deletions

View File

@@ -0,0 +1,14 @@
import { getTestServer } from "@server/test/support";
const server = getTestServer();
describe("oidc", () => {
it("should pass query params along with auth redirect", async () => {
const res = await server.get("/auth/oidc?myParam=someParam", {
redirect: "manual",
});
const redirectLocation = new URL(res.headers.get("location"));
expect(res.status).toEqual(302);
expect(redirectLocation.searchParams.get("myParam")).toEqual("someParam");
});
});