Skip to content

Commit 788ac6f

Browse files
committed
fix(browser): retype expiresIn to match StringValue type
1 parent b08e3de commit 788ac6f

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

api/src/slices/browser/browser.extension.controller.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,14 @@ export class BrowserExtensionController {
7474
// Cap at 365 days — practical upper bound for "set it once" UX
7575
// without making compromised tokens valid forever.
7676
const ttlDays = Math.max(1, Math.min(365, dto.ttlDays ?? 30));
77-
const expiresIn = `${ttlDays}d`;
7877
const token = this.jwt.sign(
7978
{
8079
sub: req.user.sub,
8180
agentId: dto.agentId,
8281
userId: dto.userId,
8382
scope: 'browser:cookies',
8483
} satisfies Omit<IExtensionTokenPayload, 'iat' | 'exp'>,
85-
{ expiresIn },
84+
{ expiresIn: `${ttlDays} days` },
8685
);
8786
const decoded = this.jwt.decode<IExtensionTokenPayload>(token);
8887
return { token, exp: decoded?.exp ?? 0 };

0 commit comments

Comments
 (0)