Drab: remote controlled frontend framework for Phoenix

Hi @ltrls,
This is true: Drab steals connect callback and therefore, you can’t use your own.
This must be changed, as not only Guardian is the victim. I am still thinking how to change it. The sooner I do it the better, as it will require all existing application to change their user_socket.ex.

There is also onconnect callback in the commander, and I was thinking to change it so it could modify the socket with Guardian.Phoenix.Socket.authenticate/3 there, and return {:ok, modified_socket}. That would be a little bit more work for you, as you need to do it in each commander, but maybe it would be good to have the authentication per commander?

1 Like