Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/livekit-server-sdk/src/AccessToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export class AccessToken {
.setProtectedHeader({ alg: 'HS256' })
.setIssuer(this.apiKey)
.setExpirationTime(this.ttl)
.setNotBefore(0);
.setNotBefore(new Date());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

was also curious why your previous attempt failed in the test and it turns out jose expects the unix timestamp in seconds and Date.now() returns millis

if (this.identity) {
jwt.setSubject(this.identity);
} else if (this.grants.video?.roomJoin) {
Expand Down
Loading