pusher / pusher/pusher-websocket-react-native
Private channel subscription issue
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 76
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
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;
};
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the private-channel subscription using the issue's onAuthorizer callback, Api.post, and urls.CHAT_AUTH flow, then inspect the onSubscriptionSucceeded logs. Compare the returned auth and id values with the SDK's private-channel authentication expectations. Done means a valid private-channel subscription invokes onSubscriptionSucceeded.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100