Skip to content

Commit

Permalink
fix e2e test so it doesn't try to store duplicate authorization codes…
Browse files Browse the repository at this point in the history
… in the database
  • Loading branch information
ldgit committed Sep 18, 2024
1 parent 88b605b commit f0856f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion e2e/oauth2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ test("/token endpoint should respond with 400 status code and invalid_grant erro
const codeChallenge = createHash("sha256").update(codeVerifier).digest("base64url");

const userId = (await query("SELECT id FROM users WHERE username = $1", ["MarkS"])).rows[0].id;
const authorizationCode = "SdNo_I0y2U3yT1bp~v8Vr6wdfVAu_VubbJeClS309cGse-MCM4Pmq82V5FqaQbvG";
const authorizationCode = cryptoRandomString({ length: 64, characters: "alphanumeric" });
// Set up so the user has already approved the authorization request and we manually create the
// already *expired* authorization code.
await query(
Expand Down

0 comments on commit f0856f6

Please sign in to comment.