Ahoiroman
Understanding authentication with websockets
Hello everybody,
I am trying to understand and solve an issue: I want to make use of Websockets in order to broadcast events from my backend (Laravel using Soketi) to my frontend (Nuxt3). For auth I am using nuxt-auth-sanctum (https://github.com/manchenkoff/nuxt-auth-sanctum)
Now here's what happens: Using this plugin (
echo.client.ts
):
I indeed can subscribe to a channel like this:
But if I try to subscribe to another channel in another compoent, I am getting logged out.
I am using routeRules to proxy requests to my backend, which I defined like this:
Now I really don't have any idea, what's going wrong there. What I do see is that for some reason a new session is being created when I subscribe to two channels, which does not happen if I subscribe only to one.7 replies