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

Bug: Auth endpoint only called once. #524

Closed
AlaaZorkane opened this issue Jan 26, 2021 · 3 comments
Closed

Bug: Auth endpoint only called once. #524

AlaaZorkane opened this issue Jan 26, 2021 · 3 comments

Comments

@AlaaZorkane
Copy link

AlaaZorkane commented Jan 26, 2021

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

What is the current behavior?
Auth endpoint is being called only once over multiple pusher instances. Even when the first instance is destroyed.

If the current behavior is a bug, please provide the steps to reproduce and
if possible a minimal demo of the problem via https://jsfiddle.net or similar.

  • Make a pusher instance with auth params X
  • Disconnect and destroy the first pusher instance
  • Make a second pusher instance with auth params Y
  • The second pusher instance is connected (pusher dashboard logs) but not authorized (auth endpoint not being called)

What is the expected behavior?
The auth endpoint should be called on each pusher instance, since they're isolated from eachother, the authorization flows should also be isolated.

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

Latest/All

@benw-pusher
Copy link
Contributor

Hi,

The auth endpoint will be called when you attempt to subscribe to a private or presence channel. Does your code subscribe to such a channel after the second instance has been created?

@AlaaZorkane
Copy link
Author

Hello!

You're right! The auth endpoint only gets called after I try to subscribe. My bad! Issue closed.

@ahmetkca
Copy link

Pusher is using the default user authentication endpoint even thought I am overriding with /api/pusher/user-auth

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

3 participants