Phoenix, LiveView and Guardian integration to authenticate socket connection


I have a problem to setup LiveView with Guardian to authenticate WebSocket connection. I am not able to achieve that because this function Guardian.Phoenix.Socket.authenticate/5 uses under the hood this function from phoenix framework Phoenix.Socket.assign/3 which accepts only %Phoenix.Socket{} struct, but LiveView uses its own struct to store socket %Phoenix.LiveView.Socket{}. Any ideas on how to solve/overcome this problem?

1 Like


I suggest to open an issue on

1 Like