From e3103e8b0fa794c5be0456c813b4c2c442e938bc Mon Sep 17 00:00:00 2001 From: Steffen Deusch Date: Wed, 19 Feb 2025 19:03:36 +0100 Subject: [PATCH] auth_token does not need to be passed to connect_info --- guides/real_time/channels.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/real_time/channels.md b/guides/real_time/channels.md index 14510c0578..1397451371 100644 --- a/guides/real_time/channels.md +++ b/guides/real_time/channels.md @@ -387,14 +387,14 @@ When we connect, we'll often need to authenticate the client. Fortunately, this ### Step 1 - Enable the `auth_token` functionality in the socket -Phoenix supports a transport agnostic way to pass an authentication token to the server. To enable this, we need to pass the `:auth_token` option to the socket declaration in our `Endpoint` module and configure the `connect_info` to include the `:auth_token` key. +Phoenix supports a transport agnostic way to pass an authentication token to the server. To enable this, we need to pass the `:auth_token` option to the socket declaration in our `Endpoint` module. ```elixir defmodule HelloWeb.Endpoint do use Phoenix.Endpoint, otp_app: :hello socket "/socket", HelloWeb.UserSocket, - websocket: [connect_info: [:auth_token]], + websocket: true, longpoll: false, auth_token: true