Closed dchennaraidu closed 5 years ago
Hi!
tokenAboutToExpire
is emitted roughly 1 minute before the token expiration - hence, if you will use ttl smaller than 1 minute - then it won't fire.
And in general - we don't recommend to use tokens with such small ttl (because of practical reasons).
May I ask why do you need token with ttl 40 seconds?
Aleksandrs
Hi!
tokenAboutToExpire
is emitted roughly 1 minute before the token expiration - hence, if you will use ttl smaller than 1 minute - then it won't fire. And in general - we don't recommend to use tokens with such small ttl (because of practical reasons). May I ask why do you need token with ttl 40 seconds?Aleksandrs
Hi Ivanovs, thanks for the info, and I'm exploring how it works when chat token is expired (so I set 40 to test). Now I increased it to 180
tokenAboutToExpire
didn't work, tokenExpired
worked but even after updating with new token, client is in offline mode
I increased to ttl to 240, tokenAboutToExpire
is emitted. Thanks for the help @aleksandrsivanovs
I have reduced the ttl to 40 seconds tokenprovider.js, but on the client side
tokenAboutToExpire
event is never getting hit.So I have added
tokenExpired
event listener, but unable to update client. (unable to send/retrive messages thereafter)