@stream-io/node-sdk 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/StreamClient.ts +4 -4
package/package.json
CHANGED
package/src/StreamClient.ts
CHANGED
|
@@ -138,8 +138,8 @@ export class StreamClient {
|
|
|
138
138
|
*/
|
|
139
139
|
createToken(
|
|
140
140
|
userID: string,
|
|
141
|
-
exp = Math.round(
|
|
142
|
-
iat = Math.
|
|
141
|
+
exp = Math.round(Date.now() / 1000) + 60 * 60,
|
|
142
|
+
iat = Math.floor((Date.now() - 1000) / 1000),
|
|
143
143
|
call_cids?: string[],
|
|
144
144
|
) {
|
|
145
145
|
const payload: UserTokenPayload = {
|
|
@@ -169,8 +169,8 @@ export class StreamClient {
|
|
|
169
169
|
createCallToken(
|
|
170
170
|
userIdOrObject: string | { user_id: string; role?: string },
|
|
171
171
|
call_cids: string[],
|
|
172
|
-
exp = Math.round(
|
|
173
|
-
iat = Math.
|
|
172
|
+
exp = Math.round(Date.now() / 1000) + 60 * 60,
|
|
173
|
+
iat = Math.floor((Date.now() - 1000) / 1000),
|
|
174
174
|
) {
|
|
175
175
|
const payload: CallTokenPayload = {
|
|
176
176
|
exp,
|