1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-09 10:22:46 +03:00

add prompt param to OIDC auth url creation (#3794)

This commit is contained in:
Kerry
2023-10-11 15:20:23 +13:00
committed by GitHub
parent c8f8fb587d
commit 1de6de05a1
2 changed files with 29 additions and 2 deletions

View File

@@ -134,6 +134,25 @@ describe("oidc authorization", () => {
expect(authUrl.searchParams.get("code_challenge")).toBeTruthy();
});
it("should generate url with create prompt", async () => {
const nonce = "abc123";
const metadata = delegatedAuthConfig.metadata;
const authUrl = new URL(
await generateOidcAuthorizationUrl({
metadata,
homeserverUrl: baseUrl,
clientId,
redirectUri: baseUrl,
nonce,
prompt: "create",
}),
);
expect(authUrl.searchParams.get("prompt")).toEqual("create");
});
});
describe("completeAuthorizationCodeGrant", () => {