Files
twenty/packages
Marie 68db9a7a8c (fix) throw if Access JWT does not have a userWorkspaceId (#10225)
After introducing userWorkspaceId into JWTs, we were wrongfully
executing
```
const userWorkspace = await this.userWorkspaceRepository.findOne({
      where: {
        id: payload.userWorkspaceId,
      },
    });
```

which would return a random userWorkpace if `payload.userWorkspaceId` is
undefined.

All generated JWTs have had a userWorkspaceId for more than a week now,
but in tests we had not modified the accessToken in use, which did not
have a userWorkspaceId, until [this
pr](https://github.com/twentyhq/twenty/pull/10204)
2025-02-14 17:48:06 +01:00
..
2024-06-11 19:06:37 +02:00