ConnectyCube / connectycube-reactnative-samples

Chat and Video Chat code samples for React Native, ConnectyCube
https://connectycube.com
Apache License 2.0
125 stars 111 forks source link

On session expiration callback not getting called #248

Closed codepoetryindia closed 3 years ago

codepoetryindia commented 3 years ago

init = () => ConnectyCube.init({ appId: 4948, authKey: 'H2hUALR3s5wKnM7', authSecret: '****', },{ on: {

sessionExpired: (handleResponse, retry) => {
  console.log("call callback");
  handleResponse();
  // call handleResponse() if you do not want to process a session expiration,
  // so an error will be returned to origin request
  // handleResponse();

  ConnectyCube.createSession()
    .then(retry)
    .catch((error) => {});
},

}, debug: { mode: 1 } });

ccvlad commented 3 years ago

What will show console.log(ConnectyCube.service.sdkInstance.config.on.sessionExpired) after ConnectyCube.init()? Is the console.log("call callback") called?

Could you show your logs?

codepoetryindia commented 3 years ago

No, it's not getting called. after I destroy the session using the rest API

ccvlad commented 3 years ago

Try to make some API call after destroySession. The expiration callback is called after getting error

codepoetryindia commented 3 years ago

Try to make some API call after destroySession. The expiration callback is called after getting error

Thanks for your response. issue has been resolved