JavaScript client SDK to communicate with Centrifugo and Centrifuge-based server from browser, NodeJS and React Native. Supports WebSocket, HTTP-streaming over Fetch and Readable Stream API, EventSource, WebTransport.
Describtion
I'm using the Centrifuge class option getToken to retrieve new token every X timeout to fetch a new token.
It seems like it's not firing if the token expires after 1 hour. It did fire on another centrifuge server env.not really sure it relates to timeout...
Is there any config or some server side config missing? something else?
To Reproduce
Steps to reproduce the behavior:
connect to a session that expects a connection token
pass a getToken callback to the Centrifuge class option and a valid token
new Centrifuge("endpoint", {token: "validToken", getToken: Function})
make sure token expires after one hour
callback doesn't fire
Expected behavior
callback should fire
Versions
MacOS Version 13.0.1 (22A400)
chrome 115
Centrifuge client version 4.0.1
Additional context
example token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJmYTBlYzIwYS1jZWIwLTQ3OTktOWRiNy01ODQ0MGRmZWM4NTQiLCJpYXQiOjE2OTUxNDI4MzIsImV4cCI6MTY5NTE0NjQzMn0.aHVFC5MolGDaAO3AMct6mzjDUWN7kbccpge1ayRn6cE
Describtion I'm using the
Centrifuge
class optiongetToken
to retrieve new token every X timeout to fetch a new token. It seems like it's not firing if the token expires after 1 hour. It did fire on another centrifuge server env.not really sure it relates to timeout... Is there any config or some server side config missing? something else?To Reproduce Steps to reproduce the behavior:
getToken
callback to theCentrifuge
class option and a valid tokennew Centrifuge("endpoint", {token: "validToken", getToken: Function})
Expected behavior callback should fire
Versions
Additional context example token:
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJmYTBlYzIwYS1jZWIwLTQ3OTktOWRiNy01ODQ0MGRmZWM4NTQiLCJpYXQiOjE2OTUxNDI4MzIsImV4cCI6MTY5NTE0NjQzMn0.aHVFC5MolGDaAO3AMct6mzjDUWN7kbccpge1ayRn6cE