Skip to content

Commit 0159b02

Browse files
authored
Fix service token generation (#1731)
Fixes OPS-3197.
1 parent 093eaba commit 0159b02

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/server/api/src/app/authentication/context/access-token-manager.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,12 @@ export const accessTokenManager = {
9797

9898
const secret = await jwtUtils.getJwtSecret();
9999

100+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
101+
const { exp: _exp, iat: _iat, iss: _iss, ...payload } = principal as any;
102+
100103
return jwtUtils.sign({
101104
payload: {
102-
...principal,
105+
...payload,
103106
type: PrincipalType.SERVICE,
104107
},
105108
key: secret,

0 commit comments

Comments
 (0)