How to halt and redirect if the user is not authenticated but tries to access the live route?
The second mount function gives invalid result returned error.
@impl true
def mount(_params, %{"current_user_id" => _current_user_id}, socket) do
{:ok, socket}
end
@impl true
def mount(_params, _session, _socket) do
{:error, :unauthorized}
end