I'm looking to create a chat system for an application of mine, an application where Authenticated users can create public or private events. I'm using Laravel Websockets and Laravel Echo. When I create a private channel and a user is not logged in, I get a 403 error, which is fine. The authentication or "handshake", is based off of Laravel's default Authentication system. Is it possible instead to allow/disallow access to the private channel using a condition, instead of Laravel's Auth system? For example weather a user with an ID exists in a different table, not the users table?
Let's say I have a table called reg_users
(for registered users) for an event, with id of ud4x7mw
in the URL, and I simply want to check weather the user with that ID exists or not, and if they do grant them access to the channel, if not deny them access. Would something like this be possible?