无法通过身份验证通道进行身份验证(客户端无法通过身份验证,HTTP状态为403)Laravel Echo Server

时间:2020-04-11 19:40:43

标签: php laravel socket.io laravel-echo echo-server

一切正常,但是当我尝试运行

laravel-echo-server start 

从主管下面出现错误。

[11:25:15 PM] - zmMtehwMctWVHxFBAAAB joined channel: chats-channel
[11:25:16 PM] - Preparing authentication request to: https://test.net
[11:25:16 PM] - Sending auth request to: https://test.net/broadcasting/auth

⚠ [11:25:16 PM] - zmMtehwMctWVHxFBAAAB could not be authenticated to presence-chats-channel

Client can not be authenticated, got HTTP status 403

1 个答案:

答案 0 :(得分:0)

我通过从vue组件中删除以下代码解决了这个问题。

Echo.join(chat.${roomId})
.here((users) => {
//
})
.joining((user) => {
console.log(user.name);
})
.leaving((user) => {
console.log(user.name);
});