-
Notifications
You must be signed in to change notification settings - Fork 32
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
v2.0.0-alpha.1 with laravel sanctum is broken #48
Comments
Hi @yoelpc4 |
Hi @yoelpc4 |
It seems that the @nuxtjs/laravel-echo plugin isn't calling connect method at all although I've logged in through nuxt auth. nuxt.config.js buildModules: [
...
'@nuxtjs/laravel-echo',
],
echo: {
authModule: true,
broadcaster: 'pusher',
cluster: 'ap1',
connectOnLogin: true,
disconnectOnLogout: true,
encrypted: true,
forceTLS: true,
key: '...',
optionsPath: './laravel-echo.options.js',
},
modules: [
...
'@nuxtjs/auth-next',
], with the following laravel-echo.options.js export default ({ $axios }) => ({
authorizer: (channel) => ({
authorize: (socketId, authorizerCallback) =>
$axios
.post('/backend/api/broadcasting/auth', {
channel_name: channel.name,
socket_id: socketId,
})
.then(({ data }) => authorizerCallback(false, data))
.catch((error) => authorizerCallback(true, error)),
}),
onAfterConnect() {
console.log('laravel echo connected')
},
}) Because the onAfterConnect hook is not invoked and I've checked out on pusher debug console there's no connection logs at all. |
I get 401 Unauthorized error |
Hi @yoelpc4 Try ^2.0.0-alpha.4 |
@ricardogobbosouza now it doesnt connect to my websocket server(laravel-websockets) |
@radudiaconu0 Please provide a repository |
Hi @radudiaconu0 https://github.com/radudiaconu0/cheermeapp-frontend/ Always with error |
@ricardogobbosouza set domains from cheermeapp.test to localhost. In laravel app and nuxtapp |
in nuxt.config.js:
My connector is set to |
Hello. When I set authModule to true, I get this error: TypeError: Cannot read property 'bind' of undefined |
Having the same issue. Looks like v2 is buggy. |
Yes. That's why I used v1 |
Hi @ricardogobbosouza I have these package versions
dependencies:
devDependencies
with the following nuxt config
As you suggest to install v2.0.0-alpha.1 on recent issue #47 along with nuxt auth next laravel sanctum strategy, it resulted ReferenceError "location is not defined" on this line:
laravel-echo-module/src/runtime/echo.ts
Line 38 in 7a5e78a
The text was updated successfully, but these errors were encountered: