Open vbaseghyanupwork opened 3 years ago
Hi @vbaseghyanupwork Sorry for the late reply I will think about having an option to be called before and after the echo connects
For now you can try this:
export default function ({ $echo, app }) {
ctx.app.$auth.$storage.watchState('loggedIn', loggedIn => {
if (loggedIn) {
const id= app.$auth.$state.user.id
$echo.private('my-notifications.' + id).listen('.TestEvent', (e) => {
console.log('event triggered')
console.log(e.entity)
})
}
})
}
Hi there,
I have this in my nuxt.config.js
and outside of build module
and auth scheme like
and my echo.js in plugins
So the issue here, is when I'm logging in, this doesn't make connection to that channel automatically, and works only when I'm doing refresh in browser.
So basically authorization is not happening when I'm logging in.
Any hints, how can I do that?
Thanks