defmodule LivebookWeb.AppAuthLive do use LivebookWeb, :live_view @impl true def mount(%{"slug" => slug}, _session, socket) when not socket.assigns.app_authenticated? do {:ok, assign(socket, slug: slug, password: "", errors: [])} end def mount(%{"slug" => slug}, _session, socket) do {:ok, push_navigate(socket, to: ~p"/apps/#{slug}")} end @impl true def render(assigns) do ~H"""