Current documentation on Generating Signatures doesn’t offer many details, or maybe I’m missing something… The example code includes:
let signature = ""; const iat = Math.round(new Date().getTime() / 1000); const exp = iat + 60 * 60 * 2;
…which I assume is saying the expiration will be 2 hours in the future, though I’ve yet to test this.
Questions related to Signature/Session Lifetime:
Is there a max lifetime? i.e. 24 hours?
Does each user need their own unique signature, or can one signature be used per topic?
Example of the latter, if 3 people were joining a topic named “teammeeting”:
client.join('teammeeting', signature: 'aabbcc', username: 'mary', password: '1234').then(() ...
client.join('teammeeting', signature: 'aabbcc', username: 'kimberly', password: '5324').then(() ...
client.join('teammeeting', signature: 'aabbcc', username: 'michael', password: '8851').then(() ...
If exp = 30 minutes, will the user be disconnected after 30 min? (this is the behavior with CPAAS vendors such as Agora)
- If yes, is there a recommended way of seamlessly renewing sessions so the user does not experience interruption?
- If no, I suppose renewal is a non-issue, since the user can stay as long as they’d like, and if they leave/re-join they can be issued a new signature.