Closed nandorojo closed 1 year ago
The onAuthorizer
should return the full authentication JSON, as detailed at https://github.com/pusher/pusher-websocket-react-native#onauthorizer.
If you are looking to customize the headers sent when requesting an auth token from your endpoint then you will need to use the onAuthorizer
callback to make the auth request manually. see https://github.com/pusher/pusher-websocket-react-native/issues/40#issuecomment-1322408009 for detail.
I'm a bit confused about how to handle auth with Pusher's native library here.
It's working fine on Web with this code with
pusher-js
and our auth endpoint:I tried to use similar code for
pusher-websocket-react-native
:However, this isn't working. Our backend isn't receiving the right header. What's the recommended way to do this? Is there a way to add headers?