expireTime causes 1004 authentication error.
Closed this issue · 5 comments
adambutler commented
Works
token = opentok.generateToken( myToken, {
role: 'moderator'
});
Broken
token = opentok.generateToken( myToken, {
role: 'moderator',
expireTime: (new Date().getTime() / 1000)+(7 * 24 * 60 * 60)
});
aoberoi commented
the first parameter should be a sessionId
, not a token (unless you named your sessionId myToken
).
adambutler commented
:) sorry ignore that that bit was just a typo, issue is still relevant
aoberoi commented
reproduced. you are right, sir. thanks for the report.
turns out that the implementation is using the fractional number for expire time (e.g. 1416578335.251) directly because thats what the expireTime
value contains. it would be nicer if the module rounded that number for you.
the workaround for now is to just wrap the time in a Math.round()
adambutler commented
👍