Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paramsProvider arguments #835

Open
tdeo opened this issue Sep 2, 2024 · 0 comments
Open

paramsProvider arguments #835

tdeo opened this issue Sep 2, 2024 · 0 comments

Comments

@tdeo
Copy link

tdeo commented Sep 2, 2024

Do you want to request a feature or report a bug?

This would be a new feature request

What is the current behavior?

Today, it's possible to use paramsProvider to send additional information during the channelAuthorization call. When using more and more different channels, this is starting to grow our payload significantly because the paramsProvider isn't aware of the channel being subscribed to and have to return the params for all possible options to the backend, and the backend can then look at the appropriate params depending on the channel being authorized, by looking at the channel_name parameter.

What is the expected behavior?

I think it would make our implementation quite easier if paramsProvider could be provided with the params argument at the moment it's called:

let dynamicParams = authOptions.paramsProvider();
. This way we could serialize only the appropriate payload to the backend

Which versions of Pusher, and which browsers / OS are affected by this issue?
Did this work in previous versions of Pusher? If so, which?

Using pusher 8.3.0, same behavior on current master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant