Closed pexch closed 2 years ago
If I do something like:
nuxt.config.js
echo: {
...
connectOnLogin: true,
}
Then I get:
Error:
[x] Refused to set unsafe header "referer" - pusher.js?782e:863
[x] POST http://127.0.0.1:8000/api/broadcasting/auth 401 (Unauthorized) - pusher.js?782e:896
@flyingspoon - did you figure out an answer to this?
@flyingspoon - did you figure out an answer to this?
Yes, I solved it by making my own version of laravel-echo
.
I believe if I remember correctly, I ended up utilizing a specific version of Echo (might be wrong), then re-coded parts of this plugin so it works with Laravel 9x.
If you would like to see it I can post it later today, it gets the job done! :)
If you would like to see it I can post it later today, it gets the job done! :)
@flyingspoon - yes! that would be extremely helpful! :)
If you would like to see it I can post it later today, it gets the job done! :)
@flyingspoon - yes! that would be extremely helpful! :)
You can find the code below, I made it work for Soketi & Laravel Echo within Nuxt 2x: https://github.com/flyingspoon/nuxt-echo
I last touched it when I opened this issue which was in May. So I have written down what I could remember, sorry if I have missed out anything! Good luck, and happy coding! 👍
I am using Soketi as the server to receive requests. It seems that public channels work fine, but when I enable auth for presence/private channels, I end up running into the issue below. I am using Sanctum for authentication, I've enabled the required configuration for Laravel for Sanctum to work with the authEndpoint below.
Also I am using Cookie based Sessions, not tokens
nuxt.config.js
Error: