defmodule PhoenixKitWeb.Users.LoginLive do use PhoenixKitWeb, :live_view def render(assigns) do ~H"""

Welcome back!

Access your PhoenixKit account to continue using authentication features. Sign in securely with your email and password.

Don't have an account? <.link navigate="/phoenix_kit/users/register" class="font-semibold text-primary hover:underline" > Sign up for free

Log in to account

<.form for={@form} id="login_form" action="/phoenix_kit/users/log-in" phx-update="ignore" >
Login with Password

Please enter a valid email address

Password must be at least 8 characters long

<.link href="/phoenix_kit/users/reset-password" class="text-sm font-semibold text-primary hover:underline" > Forgot your password?
Development mode: Authentication testing active
""" end def mount(_params, _session, socket) do email = Phoenix.Flash.get(socket.assigns.flash, :email) form = to_form(%{"email" => email}, as: "user") {:ok, assign(socket, form: form), temporary_assigns: [form: form]} end defp show_dev_notice? do case Application.get_env(:phoenix_kit, PhoenixKit.Mailer)[:adapter] do Swoosh.Adapters.Local -> true _ -> false end end end