From 9bb304fae5057f718247e1b32e0f8e076ef70ee1 Mon Sep 17 00:00:00 2001 From: LEGO Technix <109212476+lego-technix@users.noreply.github.com> Date: Fri, 7 Mar 2025 11:22:16 +0100 Subject: [PATCH] fix(high-level-tests): add missing aud now mandatory to AccessToken --- high-level-tests/e2e/cypress/support/commands.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/high-level-tests/e2e/cypress/support/commands.js b/high-level-tests/e2e/cypress/support/commands.js index d218532ad57..88c3acca2e7 100644 --- a/high-level-tests/e2e/cypress/support/commands.js +++ b/high-level-tests/e2e/cypress/support/commands.js @@ -71,6 +71,7 @@ Cypress.Commands.add('loginExternalPlatformForTheSecondTime', () => { { user_id: 1, source: 'external', + aud: Cypress.env('APP_URL'), }, Cypress.env('AUTH_SECRET'), { expiresIn: '1h' } @@ -81,7 +82,10 @@ Cypress.Commands.add('loginExternalPlatformForTheSecondTime', () => { Cypress.Commands.add('loginWithAlmostExpiredToken', () => { cy.intercept('/api/users/me').as('getCurrentUser'); - const token = jsonwebtoken.sign({ user_id: 1 }, Cypress.env('AUTH_SECRET'), { + const token = jsonwebtoken.sign({ + user_id: 1, + aud: Cypress.env('APP_URL'), + }, Cypress.env('AUTH_SECRET'), { expiresIn: '4s', }); cy.visitMonPix(`/connexion/gar#${token}`);