SubscriptionsTransportWS.Socket.connect

You're seeing just the callback connect, go back to SubscriptionsTransportWS.Socket module for more information.
Link to this callback

connect(params, t)

View Source (optional)

Specs

connect(params :: map(), t()) :: {:ok, t()} | :error

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.

Link to this callback

connect(params, t, connect_info)

View Source (optional)

Specs

connect(params :: map(), t(), connect_info :: map()) :: {:ok, t()} | :error