pusher / pusher/pusher-websocket-react-native

Private channel subscription issue

Open
#133 2 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.