SubscriptionsTransportWS.Socket.connect
You're seeing just the callback
connect
, go back to SubscriptionsTransportWS.Socket module for more information.
Specs
Receives the socket params and authenticates the connection.
Socket params and assigns
Socket params are passed from the client and can be used to verify and authenticate a user. After verification, you can put default assigns into the socket that will be set for all channels, ie
{:ok, assign(socket, :user_id, verified_user_id)}
To deny connection, return :error
.
See Phoenix.Token
documentation for examples in
performing token verification on connect.