Skip to content

Commit

Permalink
fix(high-level-tests): add missing aud now mandatory to AccessToken
Browse files Browse the repository at this point in the history
  • Loading branch information
lego-technix committed Mar 7, 2025
1 parent b963e28 commit 9bb304f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion high-level-tests/e2e/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Cypress.Commands.add('loginExternalPlatformForTheSecondTime', () => {
{
user_id: 1,
source: 'external',
aud: Cypress.env('APP_URL'),
},
Cypress.env('AUTH_SECRET'),
{ expiresIn: '1h' }
Expand All @@ -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}`);
Expand Down

0 comments on commit 9bb304f

Please sign in to comment.