Open ItxAltaf opened 7 months ago
Do you see any errors regarding the subscription attempt?
What is the response from your auth endpoint (what does this log output console.log( onAuthorizerresponse:, response);
)?
For a private channel no id
is required, the correct format is:
{
"auth": "key:signature"
}
onSubscriptionSucceeded not calling on private channel
I add onAuthorizer but did not work
const onAuthorizer = async (channelName, socketId) => { console.log(
calling onAuthorizer. channelName=${channelName}, socketId=${socketId}
, ); var obj = { socket_id: socketId, channel_name: channelName, }; const response = await Api.post(urls.CHAT_AUTH, obj, (isChatify = true)); console.log(onAuthorizerresponse:
, response); if (!isAuthenticated) { // Your authentication logic here isAuthenticated = true; return {auth:response.auth,id:'3'}; } // If already authenticated, return null or undefined return null; // return response; };