We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bb6eb2 commit a800c29Copy full SHA for a800c29
src/token.ts
@@ -101,7 +101,8 @@ function getPayload({
101
payload.exp =
102
typeof expiresAt === "number"
103
? expiresAt
104
- : Math.floor(expiresAt.getTime() / 1000);
+ : // To get from a Date object the number of seconds since Unix epoch, i.e. Unix timestamp:
105
+ Math.floor(expiresAt.getTime() / 1000);
106
}
107
108
return encodeToBase64(payload).replace(/=/g, "");
0 commit comments