Socket io not working if there is security provider in server action

The socket calls are simply external calls from remote services with no session. So there is no active session. You need to remove that check.