from channels.auth import http_session_user, channel_session_user, channel_session_user_from_http

@channel_session_user_from_http
def ws_connect(message):
    pass
How to get current user from a Django Channels web socket packet?