From 9022971fb9fd09566a85aebb77fc3634f4fa0849 Mon Sep 17 00:00:00 2001 From: Kagami Sascha Rosylight Date: Sun, 4 Jun 2023 12:30:13 +0200 Subject: [PATCH] precomputed pkce test --- packages/backend/test/e2e/oauth.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/backend/test/e2e/oauth.ts b/packages/backend/test/e2e/oauth.ts index c6a5da9d4..ec64014cb 100644 --- a/packages/backend/test/e2e/oauth.ts +++ b/packages/backend/test/e2e/oauth.ts @@ -282,9 +282,10 @@ describe('OAuth', () => { assert.strictEqual((await response.json() as OAuthErrorResponse).error, 'invalid_request'); }); - // TODO: Use precomputed challenge/verifier set for this one for deterministic test test('Verify PKCE', async () => { - const { code_challenge, code_verifier } = await pkceChallenge(128); + // Use precomputed challenge/verifier set for this one for deterministic test + const code_challenge = '4w2GDuvaxXlw2l46k5PFIoIcTGHdzw2i3hrn-C_Q6f7u0-nTYKd-beVEYy9XinYsGtAix.Nnvr.GByD3lAii2ibPRsSDrZgIN0YQb.kfevcfR9aDKoTLyOUm4hW4ABhs'; + const code_verifier = 'Ew8VSBiH59JirLlg7ocFpLQ6NXuFC1W_rn8gmRzBKc8'; const client = getClient();