Repository: phoenixframework/phoenix
Pull request #5975 (2024-11-15 01:48:34)

Preserve original name when `as` is not provided to `simple_form`
Remove the default `nil` value for the `as` attribute in the generated `simple_form` core component.

This default interferes with the form name present in the form struct provided through the component's `for` attribute when used with `:let=`.

For example, consider the following code:

```
<.simple_form :let={f} for={@form}>
  <%= inspect(f.name) %>
  <.input field={f[:bar]} label="Bar" />
</.simple_form>
```

When rendered, `f.name` is `nil`, and the `name` attribute of the form field only contains `bar`, missing the proper field name prefix from the form struct:

```
<div class="mt-10 space-y-8 bg-white">
  nil
  <div data-phx-id="m9-phx-GAgAfRg6YU4XV6tC">
    <label for="bar" class="block text-sm font-semibold leading-6 text-zinc-800" data-phx-id="m10-phx-GAgAfRg6YU4XV6tC">
    Bar
    </label>
    <input type="text" name="bar" id="bar" class="mt-2 block w-full rounded-lg text-zinc-900 focus:ring-0 sm:text-sm sm:leading-6 border-zinc-300 focus:border-zinc-400">
  </div>
</div>
```

This issue been reported [over here](https://github.com/phoenixframework/phoenix/issues/5901).

Fixes phoenixframework/phoenix#5901


Patch:
diff --git a/installer/templates/phx_web/components/core_components.ex b/installer/templates/phx_web/components/core_components.ex
index 1aa9858b7..d639407e8 100644
--- a/installer/templates/phx_web/components/core_components.ex
+++ b/installer/templates/phx_web/components/core_components.ex
@@ -120,7 +120,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
       </.simple_form>
   """
   attr :for, :any, required: true, doc: "the data structure for the form"
-  attr :as, :any, default: nil, doc: "the server side parameter to collect all input under"
+  attr :as, :any, doc: "the server side parameter to collect all input under"
 
   attr :rest, :global,
     include: ~w(autocomplete name rel action enctype method novalidate target multipart),
@@ -130,8 +130,10 @@ defmodule <%= @web_namespace %>.CoreComponents do
   slot :actions, doc: "the slot for form actions, such as a submit button"
 
   def simple_form(assigns) do
+    assigns = assign(assigns, :as, if(assigns[:as], do: %{as: assigns[:as]}, else: %{}))
+
     ~H"""
-    <.form :let={f} for={@for} as={@as} {@rest}>
+    <.form :let={f} for={@for} {@as} {@rest}>
       <div class="mt-10 space-y-8 bg-white">
         <%%= render_slot(@inner_block, f) %>
         <div :for={action <- @actions} class="mt-2 flex items-center justify-between gap-6">
diff --git a/lib/mix/tasks/phx.gen.auth.ex b/lib/mix/tasks/phx.gen.auth.ex
index 4e2910573..04cb5d234 100644
--- a/lib/mix/tasks/phx.gen.auth.ex
+++ b/lib/mix/tasks/phx.gen.auth.ex
@@ -274,69 +274,91 @@ defmodule Mix.Tasks.Phx.Gen.Auth do
     case Keyword.fetch(context.opts, :live) do
       {:ok, true} ->
         live_files = [
-          "registration_live.ex": [web_pre, "live", web_path, "#{singular}_registration_live.ex"],
+          "registration_live.ex": [
+            web_pre,
+            "live",
+            web_path,
+            "#{singular}_live",
+            "registration.ex"
+          ],
           "registration_live_test.exs": [
             web_test_pre,
             "live",
             web_path,
-            "#{singular}_registration_live_test.exs"
+            "#{singular}_live",
+            "registration_test.exs"
           ],
-          "login_live.ex": [web_pre, "live", web_path, "#{singular}_login_live.ex"],
+          "login_live.ex": [web_pre, "live", web_path, "#{singular}_live", "login.ex"],
           "login_live_test.exs": [
             web_test_pre,
             "live",
             web_path,
-            "#{singular}_login_live_test.exs"
+            "#{singular}_live",
+            "login_test.exs"
           ],
           "reset_password_live.ex": [
             web_pre,
             "live",
             web_path,
-            "#{singular}_reset_password_live.ex"
+            "#{singular}_live",
+            "reset_password.ex"
           ],
           "reset_password_live_test.exs": [
             web_test_pre,
             "live",
             web_path,
-            "#{singular}_reset_password_live_test.exs"
+            "#{singular}_live",
+            "reset_password_test.exs"
           ],
           "forgot_password_live.ex": [
             web_pre,
             "live",
             web_path,
-            "#{singular}_forgot_password_live.ex"
+            "#{singular}_live",
+            "forgot_password.ex"
           ],
           "forgot_password_live_test.exs": [
             web_test_pre,
             "live",
             web_path,
-            "#{singular}_forgot_password_live_test.exs"
+            "#{singular}_live",
+            "forgot_password_test.exs"
           ],
-          "settings_live.ex": [web_pre, "live", web_path, "#{singular}_settings_live.ex"],
+          "settings_live.ex": [web_pre, "live", web_path, "#{singular}_live", "settings.ex"],
           "settings_live_test.exs": [
             web_test_pre,
             "live",
             web_path,
-            "#{singular}_settings_live_test.exs"
+            "#{singular}_live",
+            "settings_test.exs"
+          ],
+          "confirmation_live.ex": [
+            web_pre,
+            "live",
+            web_path,
+            "#{singular}_live",
+            "confirmation.ex"
           ],
-          "confirmation_live.ex": [web_pre, "live", web_path, "#{singular}_confirmation_live.ex"],
           "confirmation_live_test.exs": [
             web_test_pre,
             "live",
             web_path,
-            "#{singular}_confirmation_live_test.exs"
+            "#{singular}_live",
+            "confirmation_test.exs"
           ],
           "confirmation_instructions_live.ex": [
             web_pre,
             "live",
             web_path,
-            "#{singular}_confirmation_instructions_live.ex"
+            "#{singular}_live",
+            "confirmation_instructions.ex"
           ],
           "confirmation_instructions_live_test.exs": [
             web_test_pre,
             "live",
             web_path,
-            "#{singular}_confirmation_instructions_live_test.exs"
+            "#{singular}_live",
+            "confirmation_instructions_test.exs"
           ]
         ]
 
diff --git a/lib/mix/tasks/phx.gen.auth/injector.ex b/lib/mix/tasks/phx.gen.auth/injector.ex
index 90a2116c8..48ae16782 100644
--- a/lib/mix/tasks/phx.gen.auth/injector.ex
+++ b/lib/mix/tasks/phx.gen.auth/injector.ex
@@ -161,7 +161,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.Injector do
   Menu code to inject into the application layout template.
   """
   def app_layout_menu_code_to_inject(%Schema{} = schema, padding \\ 4, newline \\ "\n") do
-    already_injected_str = "#{schema.route_prefix}/log_in"
+    already_injected_str = "#{schema.route_prefix}/log-in"
 
     base_tailwind_classes = "text-[0.8125rem] leading-6 text-zinc-900"
     link_tailwind_classes = "#{base_tailwind_classes} font-semibold hover:text-zinc-700"
@@ -182,7 +182,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.Injector do
         </li>
         <li>
           <.link
-            href={~p"#{schema.route_prefix}/log_out"}
+            href={~p"#{schema.route_prefix}/log-out"}
             method="delete"
             class="#{link_tailwind_classes}"
           >
@@ -200,7 +200,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.Injector do
         </li>
         <li>
           <.link
-            href={~p"#{schema.route_prefix}/log_in"}
+            href={~p"#{schema.route_prefix}/log-in"}
             class="#{link_tailwind_classes}"
           >
             Log in
diff --git a/lib/mix/tasks/phx.gen.html.ex b/lib/mix/tasks/phx.gen.html.ex
index b435d3a4d..76fe2aa38 100644
--- a/lib/mix/tasks/phx.gen.html.ex
+++ b/lib/mix/tasks/phx.gen.html.ex
@@ -198,7 +198,7 @@ defmodule Mix.Tasks.Phx.Gen.Html do
         ~s(<.input field={f[#{inspect(key)}]} type="checkbox" label="#{label(key)}" />)
 
       {key, :text} ->
-        ~s(<.input field={f[#{inspect(key)}]} type="text" label="#{label(key)}" />)
+        ~s(<.input field={f[#{inspect(key)}]} type="textarea" label="#{label(key)}" />)
 
       {key, :date} ->
         ~s(<.input field={f[#{inspect(key)}]} type="date" label="#{label(key)}" />)
diff --git a/lib/mix/tasks/phx.gen.live.ex b/lib/mix/tasks/phx.gen.live.ex
index 59a51514d..f0b6aa28a 100644
--- a/lib/mix/tasks/phx.gen.live.ex
+++ b/lib/mix/tasks/phx.gen.live.ex
@@ -285,7 +285,7 @@ defmodule Mix.Tasks.Phx.Gen.Live do
         ~s(<.input field={@form[#{inspect(key)}]} type="checkbox" label="#{label(key)}" />)
 
       {key, :text} ->
-        ~s(<.input field={@form[#{inspect(key)}]} type="text" label="#{label(key)}" />)
+        ~s(<.input field={@form[#{inspect(key)}]} type="textarea" label="#{label(key)}" />)
 
       {key, :date} ->
         ~s(<.input field={@form[#{inspect(key)}]} type="date" label="#{label(key)}" />)
diff --git a/priv/templates/phx.gen.auth/auth.ex b/priv/templates/phx.gen.auth/auth.ex
index 472a0214c..af36929d2 100644
--- a/priv/templates/phx.gen.auth/auth.ex
+++ b/priv/templates/phx.gen.auth/auth.ex
@@ -158,7 +158,7 @@ defmodule <%= inspect auth_module %> do
       socket =
         socket
         |> Phoenix.LiveView.put_flash(:error, "You must log in to access this page.")
-        |> Phoenix.LiveView.redirect(to: ~p"<%= schema.route_prefix %>/log_in")
+        |> Phoenix.LiveView.redirect(to: ~p"<%= schema.route_prefix %>/log-in")
 
       {:halt, socket}
     end
@@ -208,7 +208,7 @@ defmodule <%= inspect auth_module %> do
       conn
       |> put_flash(:error, "You must log in to access this page.")
       |> maybe_store_return_to()
-      |> redirect(to: ~p"<%= schema.route_prefix %>/log_in")
+      |> redirect(to: ~p"<%= schema.route_prefix %>/log-in")
       |> halt()
     end
   end
diff --git a/priv/templates/phx.gen.auth/confirmation_edit.html.heex b/priv/templates/phx.gen.auth/confirmation_edit.html.heex
index d509deedf..0f6d96d41 100644
--- a/priv/templates/phx.gen.auth/confirmation_edit.html.heex
+++ b/priv/templates/phx.gen.auth/confirmation_edit.html.heex
@@ -9,6 +9,6 @@
 
   <p :if={!@current_<%= schema.singular %>} class="text-center mt-4">
     <.link href={~p"<%= schema.route_prefix %>/register"}>Register</.link>
-    | <.link href={~p"<%= schema.route_prefix %>/log_in"}>Log in</.link>
+    | <.link href={~p"<%= schema.route_prefix %>/log-in"}>Log in</.link>
   </p>
 </div>
diff --git a/priv/templates/phx.gen.auth/confirmation_instructions_live.ex b/priv/templates/phx.gen.auth/confirmation_instructions_live.ex
index 8752927ad..ac8d9b298 100644
--- a/priv/templates/phx.gen.auth/confirmation_instructions_live.ex
+++ b/priv/templates/phx.gen.auth/confirmation_instructions_live.ex
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>ConfirmationInstructionsLive do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.ConfirmationInstructions do
   use <%= inspect context.web_module %>, :live_view
 
   alias <%= inspect context.module %>
@@ -22,7 +22,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
       <p :if={!@current_<%= schema.singular %>} class="text-center mt-4">
         <.link href={~p"<%= schema.route_prefix %>/register"}>Register</.link>
-        | <.link href={~p"<%= schema.route_prefix %>/log_in"}>Log in</.link>
+        | <.link href={~p"<%= schema.route_prefix %>/log-in"}>Log in</.link>
       </p>
     </div>
     """
diff --git a/priv/templates/phx.gen.auth/confirmation_live.ex b/priv/templates/phx.gen.auth/confirmation_live.ex
index 080ef5326..251afacec 100644
--- a/priv/templates/phx.gen.auth/confirmation_live.ex
+++ b/priv/templates/phx.gen.auth/confirmation_live.ex
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>ConfirmationLive do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.Confirmation do
   use <%= inspect context.web_module %>, :live_view
 
   alias <%= inspect context.module %>
@@ -17,7 +17,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
       <p :if={!@current_<%= schema.singular %>} class="text-center mt-4">
         <.link href={~p"<%= schema.route_prefix %>/register"}>Register</.link>
-        | <.link href={~p"<%= schema.route_prefix %>/log_in"}>Log in</.link>
+        | <.link href={~p"<%= schema.route_prefix %>/log-in"}>Log in</.link>
       </p>
     </div>
     """
diff --git a/priv/templates/phx.gen.auth/confirmation_new.html.heex b/priv/templates/phx.gen.auth/confirmation_new.html.heex
index b26b20248..97b952445 100644
--- a/priv/templates/phx.gen.auth/confirmation_new.html.heex
+++ b/priv/templates/phx.gen.auth/confirmation_new.html.heex
@@ -15,6 +15,6 @@
 
   <p :if={!@current_<%= schema.singular %>} class="text-center mt-4">
     <.link href={~p"<%= schema.route_prefix %>/register"}>Register</.link>
-    | <.link href={~p"<%= schema.route_prefix %>/log_in"}>Log in</.link>
+    | <.link href={~p"<%= schema.route_prefix %>/log-in"}>Log in</.link>
   </p>
 </div>
diff --git a/priv/templates/phx.gen.auth/context_functions.ex b/priv/templates/phx.gen.auth/context_functions.ex
index 3d4e25936..e3a2c090f 100644
--- a/priv/templates/phx.gen.auth/context_functions.ex
+++ b/priv/templates/phx.gen.auth/context_functions.ex
@@ -154,7 +154,7 @@
 
   ## Examples
 
-      iex> deliver_<%= schema.singular %>_update_email_instructions(<%= schema.singular %>, current_email, &url(~p"<%= schema.route_prefix %>/settings/confirm_email/#{&1}"))
+      iex> deliver_<%= schema.singular %>_update_email_instructions(<%= schema.singular %>, current_email, &url(~p"<%= schema.route_prefix %>/settings/confirm-email/#{&1}"))
       {:ok, %{to: ..., body: ...}}
 
   """
@@ -288,7 +288,7 @@
 
   ## Examples
 
-      iex> deliver_<%= schema.singular %>_reset_password_instructions(<%= schema.singular %>, &url(~p"<%= schema.route_prefix %>/reset_password/#{&1}"))
+      iex> deliver_<%= schema.singular %>_reset_password_instructions(<%= schema.singular %>, &url(~p"<%= schema.route_prefix %>/reset-password/#{&1}"))
       {:ok, %{to: ..., body: ...}}
 
   """
diff --git a/priv/templates/phx.gen.auth/forgot_password_live.ex b/priv/templates/phx.gen.auth/forgot_password_live.ex
index fb5ba7aa5..dc4a03a59 100644
--- a/priv/templates/phx.gen.auth/forgot_password_live.ex
+++ b/priv/templates/phx.gen.auth/forgot_password_live.ex
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>ForgotPasswordLive do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.ForgotPassword do
   use <%= inspect context.web_module %>, :live_view
 
   alias <%= inspect context.module %>
@@ -21,7 +21,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       </.simple_form>
       <p class="text-center text-sm mt-4">
         <.link href={~p"<%= schema.route_prefix %>/register"}>Register</.link>
-        | <.link href={~p"<%= schema.route_prefix %>/log_in"}>Log in</.link>
+        | <.link href={~p"<%= schema.route_prefix %>/log-in"}>Log in</.link>
       </p>
     </div>
     """
@@ -35,7 +35,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     if <%= schema.singular %> = <%= inspect context.alias %>.get_<%= schema.singular %>_by_email(email) do
       <%= inspect context.alias %>.deliver_<%= schema.singular %>_reset_password_instructions(
         <%= schema.singular %>,
-        &url(~p"<%= schema.route_prefix %>/reset_password/#{&1}")
+        &url(~p"<%= schema.route_prefix %>/reset-password/#{&1}")
       )
     end
 
diff --git a/priv/templates/phx.gen.auth/login_live.ex b/priv/templates/phx.gen.auth/login_live.ex
index 6a3c28389..e9957f607 100644
--- a/priv/templates/phx.gen.auth/login_live.ex
+++ b/priv/templates/phx.gen.auth/login_live.ex
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>LoginLive do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.Login do
   use <%= inspect context.web_module %>, :live_view
 
   def render(assigns) do
@@ -15,13 +15,13 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
         </:subtitle>
       </.header>
 
-      <.simple_form for={@form} id="login_form" action={~p"<%= schema.route_prefix %>/log_in"} phx-update="ignore">
+      <.simple_form for={@form} id="login_form" action={~p"<%= schema.route_prefix %>/log-in"} phx-update="ignore">
         <.input field={@form[:email]} type="email" label="Email" required />
         <.input field={@form[:password]} type="password" label="Password" required />
 
         <:actions>
           <.input field={@form[:remember_me]} type="checkbox" label="Keep me logged in" />
-          <.link href={~p"<%= schema.route_prefix %>/reset_password"} class="text-sm font-semibold">
+          <.link href={~p"<%= schema.route_prefix %>/reset-password"} class="text-sm font-semibold">
             Forgot your password?
           </.link>
         </:actions>
diff --git a/priv/templates/phx.gen.auth/registration_live.ex b/priv/templates/phx.gen.auth/registration_live.ex
index 3f7f422fe..f5c5ef830 100644
--- a/priv/templates/phx.gen.auth/registration_live.ex
+++ b/priv/templates/phx.gen.auth/registration_live.ex
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>RegistrationLive do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.Registration do
   use <%= inspect context.web_module %>, :live_view
 
   alias <%= inspect context.module %>
@@ -11,7 +11,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
         Register for an account
         <:subtitle>
           Already registered?
-          <.link navigate={~p"<%= schema.route_prefix %>/log_in"} class="font-semibold text-brand hover:underline">
+          <.link navigate={~p"<%= schema.route_prefix %>/log-in"} class="font-semibold text-brand hover:underline">
             Log in
           </.link>
           to your account now.
@@ -24,7 +24,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
         phx-submit="save"
         phx-change="validate"
         phx-trigger-action={@trigger_submit}
-        action={~p"<%= schema.route_prefix %>/log_in?_action=registered"}
+        action={~p"<%= schema.route_prefix %>/log-in?_action=registered"}
         method="post"
       >
         <.error :if={@check_errors}>
diff --git a/priv/templates/phx.gen.auth/registration_new.html.heex b/priv/templates/phx.gen.auth/registration_new.html.heex
index 6f036442e..ae1c5fbb8 100644
--- a/priv/templates/phx.gen.auth/registration_new.html.heex
+++ b/priv/templates/phx.gen.auth/registration_new.html.heex
@@ -3,7 +3,7 @@
     Register for an account
     <:subtitle>
       Already registered?
-      <.link navigate={~p"<%= schema.route_prefix %>/log_in"} class="font-semibold text-brand hover:underline">
+      <.link navigate={~p"<%= schema.route_prefix %>/log-in"} class="font-semibold text-brand hover:underline">
         Log in
       </.link>
       to your account now.
diff --git a/priv/templates/phx.gen.auth/reset_password_controller.ex b/priv/templates/phx.gen.auth/reset_password_controller.ex
index 5dc1c60fc..e572e4d5f 100644
--- a/priv/templates/phx.gen.auth/reset_password_controller.ex
+++ b/priv/templates/phx.gen.auth/reset_password_controller.ex
@@ -13,7 +13,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     if <%= schema.singular %> = <%= inspect context.alias %>.get_<%= schema.singular %>_by_email(email) do
       <%= inspect context.alias %>.deliver_<%= schema.singular %>_reset_password_instructions(
         <%= schema.singular %>,
-        &url(~p"<%= schema.route_prefix %>/reset_password/#{&1}")
+        &url(~p"<%= schema.route_prefix %>/reset-password/#{&1}")
       )
     end
 
@@ -36,7 +36,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       {:ok, _} ->
         conn
         |> put_flash(:info, "Password reset successfully.")
-        |> redirect(to: ~p"<%= schema.route_prefix %>/log_in")
+        |> redirect(to: ~p"<%= schema.route_prefix %>/log-in")
 
       {:error, changeset} ->
         render(conn, :edit, changeset: changeset)
diff --git a/priv/templates/phx.gen.auth/reset_password_edit.html.heex b/priv/templates/phx.gen.auth/reset_password_edit.html.heex
index a4699b854..29615463d 100644
--- a/priv/templates/phx.gen.auth/reset_password_edit.html.heex
+++ b/priv/templates/phx.gen.auth/reset_password_edit.html.heex
@@ -3,7 +3,7 @@
     Reset Password
   </.header>
 
-  <.simple_form :let={f} for={@changeset} action={~p"<%= schema.route_prefix %>/reset_password/#{@token}"}>
+  <.simple_form :let={f} for={@changeset} action={~p"<%= schema.route_prefix %>/reset-password/#{@token}"}>
     <.error :if={@changeset.action}>
       Oops, something went wrong! Please check the errors below.
     </.error>
@@ -24,6 +24,6 @@
 
   <p class="text-center text-sm mt-4">
     <.link href={~p"<%= schema.route_prefix %>/register"}>Register</.link>
-    | <.link href={~p"<%= schema.route_prefix %>/log_in"}>Log in</.link>
+    | <.link href={~p"<%= schema.route_prefix %>/log-in"}>Log in</.link>
   </p>
 </div>
diff --git a/priv/templates/phx.gen.auth/reset_password_live.ex b/priv/templates/phx.gen.auth/reset_password_live.ex
index 32845c9ee..8d07fd8a8 100644
--- a/priv/templates/phx.gen.auth/reset_password_live.ex
+++ b/priv/templates/phx.gen.auth/reset_password_live.ex
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>ResetPasswordLive do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.ResetPassword do
   use <%= inspect context.web_module %>, :live_view
 
   alias <%= inspect context.module %>
@@ -32,7 +32,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
       <p class="text-center text-sm mt-4">
         <.link href={~p"<%= schema.route_prefix %>/register"}>Register</.link>
-        | <.link href={~p"<%= schema.route_prefix %>/log_in"}>Log in</.link>
+        | <.link href={~p"<%= schema.route_prefix %>/log-in"}>Log in</.link>
       </p>
     </div>
     """
@@ -61,7 +61,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
         {:noreply,
          socket
          |> put_flash(:info, "Password reset successfully.")
-         |> redirect(to: ~p"<%= schema.route_prefix %>/log_in")}
+         |> redirect(to: ~p"<%= schema.route_prefix %>/log-in")}
 
       {:error, changeset} ->
         {:noreply, assign_form(socket, Map.put(changeset, :action, :insert))}
diff --git a/priv/templates/phx.gen.auth/reset_password_new.html.heex b/priv/templates/phx.gen.auth/reset_password_new.html.heex
index 739078687..3d2e40b0d 100644
--- a/priv/templates/phx.gen.auth/reset_password_new.html.heex
+++ b/priv/templates/phx.gen.auth/reset_password_new.html.heex
@@ -4,7 +4,7 @@
     <:subtitle>We'll send a password reset link to your inbox</:subtitle>
   </.header>
 
-  <.simple_form :let={f} for={@conn.params["<%= schema.singular %>"]} as={:<%= schema.singular %>} action={~p"<%= schema.route_prefix %>/reset_password"}>
+  <.simple_form :let={f} for={@conn.params["<%= schema.singular %>"]} as={:<%= schema.singular %>} action={~p"<%= schema.route_prefix %>/reset-password"}>
     <.input field={f[:email]} type="email" placeholder="Email" required />
     <:actions>
       <.button phx-disable-with="Sending..." class="w-full">
@@ -15,6 +15,6 @@
 
   <p class="text-center text-sm mt-4">
     <.link href={~p"<%= schema.route_prefix %>/register"}>Register</.link>
-    | <.link href={~p"<%= schema.route_prefix %>/log_in"}>Log in</.link>
+    | <.link href={~p"<%= schema.route_prefix %>/log-in"}>Log in</.link>
   </p>
 </div>
diff --git a/priv/templates/phx.gen.auth/routes.ex b/priv/templates/phx.gen.auth/routes.ex
index 60ced3360..928ea70c4 100644
--- a/priv/templates/phx.gen.auth/routes.ex
+++ b/priv/templates/phx.gen.auth/routes.ex
@@ -6,22 +6,22 @@
 
     live_session :redirect_if_<%= schema.singular %>_is_authenticated,
       on_mount: [{<%= inspect auth_module %>, :redirect_if_<%= schema.singular %>_is_authenticated}] do
-      live "/<%= schema.plural %>/register", <%= inspect schema.alias %>RegistrationLive, :new
-      live "/<%= schema.plural %>/log_in", <%= inspect schema.alias %>LoginLive, :new
-      live "/<%= schema.plural %>/reset_password", <%= inspect schema.alias %>ForgotPasswordLive, :new
-      live "/<%= schema.plural %>/reset_password/:token", <%= inspect schema.alias %>ResetPasswordLive, :edit
+      live "/<%= schema.plural %>/register", <%= inspect schema.alias %>Live.Registration, :new
+      live "/<%= schema.plural %>/log-in", <%= inspect schema.alias %>Live.Login, :new
+      live "/<%= schema.plural %>/reset-password", <%= inspect schema.alias %>Live.ForgotPassword, :new
+      live "/<%= schema.plural %>/reset-password/:token", <%= inspect schema.alias %>Live.ResetPassword, :edit
     end
 
-    post "/<%= schema.plural %>/log_in", <%= inspect schema.alias %>SessionController, :create<% else %>
+    post "/<%= schema.plural %>/log-in", <%= inspect schema.alias %>SessionController, :create<% else %>
 
     get "/<%= schema.plural %>/register", <%= inspect schema.alias %>RegistrationController, :new
     post "/<%= schema.plural %>/register", <%= inspect schema.alias %>RegistrationController, :create
-    get "/<%= schema.plural %>/log_in", <%= inspect schema.alias %>SessionController, :new
-    post "/<%= schema.plural %>/log_in", <%= inspect schema.alias %>SessionController, :create
-    get "/<%= schema.plural %>/reset_password", <%= inspect schema.alias %>ResetPasswordController, :new
-    post "/<%= schema.plural %>/reset_password", <%= inspect schema.alias %>ResetPasswordController, :create
-    get "/<%= schema.plural %>/reset_password/:token", <%= inspect schema.alias %>ResetPasswordController, :edit
-    put "/<%= schema.plural %>/reset_password/:token", <%= inspect schema.alias %>ResetPasswordController, :update<% end %>
+    get "/<%= schema.plural %>/log-in", <%= inspect schema.alias %>SessionController, :new
+    post "/<%= schema.plural %>/log-in", <%= inspect schema.alias %>SessionController, :create
+    get "/<%= schema.plural %>/reset-password", <%= inspect schema.alias %>ResetPasswordController, :new
+    post "/<%= schema.plural %>/reset-password", <%= inspect schema.alias %>ResetPasswordController, :create
+    get "/<%= schema.plural %>/reset-password/:token", <%= inspect schema.alias %>ResetPasswordController, :edit
+    put "/<%= schema.plural %>/reset-password/:token", <%= inspect schema.alias %>ResetPasswordController, :update<% end %>
   end
 
   scope <%= router_scope %> do
@@ -29,24 +29,24 @@
 
     live_session :require_authenticated_<%= schema.singular %>,
       on_mount: [{<%= inspect auth_module %>, :ensure_authenticated}] do
-      live "/<%= schema.plural %>/settings", <%= inspect schema.alias %>SettingsLive, :edit
-      live "/<%= schema.plural %>/settings/confirm_email/:token", <%= inspect schema.alias %>SettingsLive, :confirm_email
+      live "/<%= schema.plural %>/settings", <%= inspect schema.alias %>Live.Settings, :edit
+      live "/<%= schema.plural %>/settings/confirm-email/:token", <%= inspect schema.alias %>Live.Settings, :confirm_email
     end<% else %>
 
     get "/<%= schema.plural %>/settings", <%= inspect schema.alias %>SettingsController, :edit
     put "/<%= schema.plural %>/settings", <%= inspect schema.alias %>SettingsController, :update
-    get "/<%= schema.plural %>/settings/confirm_email/:token", <%= inspect schema.alias %>SettingsController, :confirm_email<% end %>
+    get "/<%= schema.plural %>/settings/confirm-email/:token", <%= inspect schema.alias %>SettingsController, :confirm_email<% end %>
   end
 
   scope <%= router_scope %> do
     pipe_through [:browser]
 
-    delete "/<%= schema.plural %>/log_out", <%= inspect schema.alias %>SessionController, :delete<%= if live? do %>
+    delete "/<%= schema.plural %>/log-out", <%= inspect schema.alias %>SessionController, :delete<%= if live? do %>
 
     live_session :current_<%= schema.singular %>,
       on_mount: [{<%= inspect auth_module %>, :mount_current_<%= schema.singular %>}] do
-      live "/<%= schema.plural %>/confirm/:token", <%= inspect schema.alias %>ConfirmationLive, :edit
-      live "/<%= schema.plural %>/confirm", <%= inspect schema.alias %>ConfirmationInstructionsLive, :new
+      live "/<%= schema.plural %>/confirm/:token", <%= inspect schema.alias %>Live.Confirmation, :edit
+      live "/<%= schema.plural %>/confirm", <%= inspect schema.alias %>Live.ConfirmationInstructions, :new
     end<% else %>
     get "/<%= schema.plural %>/confirm", <%= inspect schema.alias %>ConfirmationController, :new
     post "/<%= schema.plural %>/confirm", <%= inspect schema.alias %>ConfirmationController, :create
diff --git a/priv/templates/phx.gen.auth/session_controller.ex b/priv/templates/phx.gen.auth/session_controller.ex
index cb76ac3ea..bab413a3c 100644
--- a/priv/templates/phx.gen.auth/session_controller.ex
+++ b/priv/templates/phx.gen.auth/session_controller.ex
@@ -8,7 +8,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     create(conn, params, "Account created successfully!")
   end
 
-  def create(conn, %{"_action" => "password_updated"} = params) do
+  def create(conn, %{"_action" => "password-updated"} = params) do
     conn
     |> put_session(:<%= schema.singular %>_return_to, ~p"<%= schema.route_prefix %>/settings")
     |> create(params, "Password updated successfully!")
@@ -30,7 +30,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       conn
       |> put_flash(:error, "Invalid email or password")
       |> put_flash(:email, String.slice(email, 0, 160))
-      |> redirect(to: ~p"<%= schema.route_prefix %>/log_in")
+      |> redirect(to: ~p"<%= schema.route_prefix %>/log-in")
     end
   end<% else %>
 
diff --git a/priv/templates/phx.gen.auth/session_new.html.heex b/priv/templates/phx.gen.auth/session_new.html.heex
index 341cf0b73..abddb592e 100644
--- a/priv/templates/phx.gen.auth/session_new.html.heex
+++ b/priv/templates/phx.gen.auth/session_new.html.heex
@@ -10,7 +10,7 @@
     </:subtitle>
   </.header>
 
-  <.simple_form :let={f} for={@conn.params["<%= schema.singular %>"]} as={:<%= schema.singular %>} action={~p"<%= schema.route_prefix %>/log_in"}>
+  <.simple_form :let={f} for={@conn.params["<%= schema.singular %>"]} as={:<%= schema.singular %>} action={~p"<%= schema.route_prefix %>/log-in"}>
     <.error :if={@error_message}><%%= @error_message %></.error>
 
     <.input field={f[:email]} type="email" label="Email" required />
@@ -18,7 +18,7 @@
 
     <:actions :let={f}>
       <.input field={f[:remember_me]} type="checkbox" label="Keep me logged in" />
-      <.link href={~p"<%= schema.route_prefix %>/reset_password"} class="text-sm font-semibold">
+      <.link href={~p"<%= schema.route_prefix %>/reset-password"} class="text-sm font-semibold">
         Forgot your password?
       </.link>
     </:actions>
diff --git a/priv/templates/phx.gen.auth/settings_controller.ex b/priv/templates/phx.gen.auth/settings_controller.ex
index 971c12df0..c046cf779 100644
--- a/priv/templates/phx.gen.auth/settings_controller.ex
+++ b/priv/templates/phx.gen.auth/settings_controller.ex
@@ -19,7 +19,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
         <%= inspect context.alias %>.deliver_<%= schema.singular %>_update_email_instructions(
           applied_<%= schema.singular %>,
           <%= schema.singular %>.email,
-          &url(~p"<%= schema.route_prefix %>/settings/confirm_email/#{&1}")
+          &url(~p"<%= schema.route_prefix %>/settings/confirm-email/#{&1}")
         )
 
         conn
diff --git a/priv/templates/phx.gen.auth/settings_live.ex b/priv/templates/phx.gen.auth/settings_live.ex
index b6958f43a..a1deeb080 100644
--- a/priv/templates/phx.gen.auth/settings_live.ex
+++ b/priv/templates/phx.gen.auth/settings_live.ex
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>SettingsLive do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.Settings do
   use <%= inspect context.web_module %>, :live_view
 
   alias <%= inspect context.module %>
@@ -37,7 +37,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
         <.simple_form
           for={@password_form}
           id="password_form"
-          action={~p"<%= schema.route_prefix %>/log_in?_action=password_updated"}
+          action={~p"<%= schema.route_prefix %>/log-in?_action=password-updated"}
           method="post"
           phx-change="validate_password"
           phx-submit="update_password"
@@ -124,7 +124,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
         <%= inspect context.alias %>.deliver_<%= schema.singular %>_update_email_instructions(
           applied_<%= schema.singular %>,
           <%= schema.singular %>.email,
-          &url(~p"<%= schema.route_prefix %>/settings/confirm_email/#{&1}")
+          &url(~p"<%= schema.route_prefix %>/settings/confirm-email/#{&1}")
         )
 
         info = "A link to confirm your email change has been sent to the new address."
diff --git a/priv/templates/phx.gen.live/core_components.ex b/priv/templates/phx.gen.live/core_components.ex
index 1aa9858b7..d639407e8 100644
--- a/priv/templates/phx.gen.live/core_components.ex
+++ b/priv/templates/phx.gen.live/core_components.ex
@@ -120,7 +120,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
       </.simple_form>
   """
   attr :for, :any, required: true, doc: "the data structure for the form"
-  attr :as, :any, default: nil, doc: "the server side parameter to collect all input under"
+  attr :as, :any, doc: "the server side parameter to collect all input under"
 
   attr :rest, :global,
     include: ~w(autocomplete name rel action enctype method novalidate target multipart),
@@ -130,8 +130,10 @@ defmodule <%= @web_namespace %>.CoreComponents do
   slot :actions, doc: "the slot for form actions, such as a submit button"
 
   def simple_form(assigns) do
+    assigns = assign(assigns, :as, if(assigns[:as], do: %{as: assigns[:as]}, else: %{}))
+
     ~H"""
-    <.form :let={f} for={@for} as={@as} {@rest}>
+    <.form :let={f} for={@for} {@as} {@rest}>
       <div class="mt-10 space-y-8 bg-white">
         <%%= render_slot(@inner_block, f) %>
         <div :for={action <- @actions} class="mt-2 flex items-center justify-between gap-6">


Test patch:
diff --git a/installer/templates/phx_test/controllers/error_html_test.exs b/installer/templates/phx_test/controllers/error_html_test.exs
index 6d3396470..74098fc30 100644
--- a/installer/templates/phx_test/controllers/error_html_test.exs
+++ b/installer/templates/phx_test/controllers/error_html_test.exs
@@ -2,7 +2,7 @@ defmodule <%= @web_namespace %>.ErrorHTMLTest do
   use <%= @web_namespace %>.ConnCase, async: true
 
   # Bring render_to_string/4 for testing custom views
-  import Phoenix.Template
+  import Phoenix.Template, only: [render_to_string: 4]
 
   test "renders 404.html" do
     assert render_to_string(<%= @web_namespace %>.ErrorHTML, "404", "html", []) == "Not Found"
diff --git a/priv/templates/phx.gen.auth/auth_test.exs b/priv/templates/phx.gen.auth/auth_test.exs
index bafdfd6b7..cb7943b5e 100644
--- a/priv/templates/phx.gen.auth/auth_test.exs
+++ b/priv/templates/phx.gen.auth/auth_test.exs
@@ -231,7 +231,7 @@ defmodule <%= inspect auth_module %>Test do
       conn = conn |> fetch_flash() |> <%= inspect schema.alias %>Auth.require_authenticated_<%= schema.singular %>([])
       assert conn.halted
 
-      assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/log_in"
+      assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/log-in"
 
       assert Phoenix.Flash.get(conn.assigns.flash, :error) ==
                "You must log in to access this page."
diff --git a/priv/templates/phx.gen.auth/confirmation_instructions_live_test.exs b/priv/templates/phx.gen.auth/confirmation_instructions_live_test.exs
index c1ac8b654..d8d1d2376 100644
--- a/priv/templates/phx.gen.auth/confirmation_instructions_live_test.exs
+++ b/priv/templates/phx.gen.auth/confirmation_instructions_live_test.exs
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>ConfirmationInstructionsLiveTest do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.ConfirmationInstructionsTest do
   use <%= inspect context.web_module %>.ConnCase<%= test_case_options %>
 
   import Phoenix.LiveViewTest
diff --git a/priv/templates/phx.gen.auth/confirmation_live_test.exs b/priv/templates/phx.gen.auth/confirmation_live_test.exs
index fc3112882..0eac2e43c 100644
--- a/priv/templates/phx.gen.auth/confirmation_live_test.exs
+++ b/priv/templates/phx.gen.auth/confirmation_live_test.exs
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>ConfirmationLiveTest do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.ConfirmationTest do
   use <%= inspect context.web_module %>.ConnCase<%= test_case_options %>
 
   import Phoenix.LiveViewTest
diff --git a/priv/templates/phx.gen.auth/forgot_password_live_test.exs b/priv/templates/phx.gen.auth/forgot_password_live_test.exs
index 4ad1455f6..2a7f5b362 100644
--- a/priv/templates/phx.gen.auth/forgot_password_live_test.exs
+++ b/priv/templates/phx.gen.auth/forgot_password_live_test.exs
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>ForgotPasswordLiveTest do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.ForgotPasswordTest do
   use <%= inspect context.web_module %>.ConnCase<%= test_case_options %>
 
   import Phoenix.LiveViewTest
@@ -9,18 +9,18 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
   describe "Forgot password page" do
     test "renders email page", %{conn: conn} do
-      {:ok, lv, html} = live(conn, ~p"<%= schema.route_prefix %>/reset_password")
+      {:ok, lv, html} = live(conn, ~p"<%= schema.route_prefix %>/reset-password")
 
       assert html =~ "Forgot your password?"
       assert has_element?(lv, ~s|a[href="#{~p"<%= schema.route_prefix %>/register"}"]|, "Register")
-      assert has_element?(lv, ~s|a[href="#{~p"<%= schema.route_prefix %>/log_in"}"]|, "Log in")
+      assert has_element?(lv, ~s|a[href="#{~p"<%= schema.route_prefix %>/log-in"}"]|, "Log in")
     end
 
     test "redirects if already logged in", %{conn: conn} do
       result =
         conn
         |> log_in_<%= schema.singular %>(<%= schema.singular %>_fixture())
-        |> live(~p"<%= schema.route_prefix %>/reset_password")
+        |> live(~p"<%= schema.route_prefix %>/reset-password")
         |> follow_redirect(conn, ~p"/")
 
       assert {:ok, _conn} = result
@@ -33,7 +33,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "sends a new reset password token", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset_password")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset-password")
 
       {:ok, conn} =
         lv
@@ -48,7 +48,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "does not send reset password token if email is invalid", %{conn: conn} do
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset_password")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset-password")
 
       {:ok, conn} =
         lv
diff --git a/priv/templates/phx.gen.auth/login_live_test.exs b/priv/templates/phx.gen.auth/login_live_test.exs
index 6b9d14268..11516b78a 100644
--- a/priv/templates/phx.gen.auth/login_live_test.exs
+++ b/priv/templates/phx.gen.auth/login_live_test.exs
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>LoginLiveTest do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.LoginTest do
   use <%= inspect context.web_module %>.ConnCase<%= test_case_options %>
 
   import Phoenix.LiveViewTest
@@ -6,7 +6,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
   describe "Log in page" do
     test "renders log in page", %{conn: conn} do
-      {:ok, _lv, html} = live(conn, ~p"<%= schema.route_prefix %>/log_in")
+      {:ok, _lv, html} = live(conn, ~p"<%= schema.route_prefix %>/log-in")
 
       assert html =~ "Log in"
       assert html =~ "Register"
@@ -17,7 +17,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       result =
         conn
         |> log_in_<%= schema.singular %>(<%= schema.singular %>_fixture())
-        |> live(~p"<%= schema.route_prefix %>/log_in")
+        |> live(~p"<%= schema.route_prefix %>/log-in")
         |> follow_redirect(conn, ~p"/")
 
       assert {:ok, _conn} = result
@@ -29,7 +29,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       password = "123456789abcd"
       <%= schema.singular %> = <%= schema.singular %>_fixture(%{password: password})
 
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/log_in")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/log-in")
 
       form =
         form(lv, "#login_form", <%= schema.singular %>: %{email: <%= schema.singular %>.email, password: password, remember_me: true})
@@ -42,7 +42,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     test "redirects to login page with a flash error if there are no valid credentials", %{
       conn: conn
     } do
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/log_in")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/log-in")
 
       form =
         form(lv, "#login_form",
@@ -53,13 +53,13 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
       assert Phoenix.Flash.get(conn.assigns.flash, :error) == "Invalid email or password"
 
-      assert redirected_to(conn) == "<%= schema.route_prefix %>/log_in"
+      assert redirected_to(conn) == "<%= schema.route_prefix %>/log-in"
     end
   end
 
   describe "login navigation" do
     test "redirects to registration page when the Register button is clicked", %{conn: conn} do
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/log_in")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/log-in")
 
       {:ok, _login_live, login_html} =
         lv
@@ -73,13 +73,13 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     test "redirects to forgot password page when the Forgot Password button is clicked", %{
       conn: conn
     } do
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/log_in")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/log-in")
 
       {:ok, conn} =
         lv
         |> element(~s|main a:fl-contains("Forgot your password?")|)
         |> render_click()
-        |> follow_redirect(conn, ~p"<%= schema.route_prefix %>/reset_password")
+        |> follow_redirect(conn, ~p"<%= schema.route_prefix %>/reset-password")
 
       assert conn.resp_body =~ "Forgot your password?"
     end
diff --git a/priv/templates/phx.gen.auth/registration_controller_test.exs b/priv/templates/phx.gen.auth/registration_controller_test.exs
index 2682277b0..53dfbb2e6 100644
--- a/priv/templates/phx.gen.auth/registration_controller_test.exs
+++ b/priv/templates/phx.gen.auth/registration_controller_test.exs
@@ -8,7 +8,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       conn = get(conn, ~p"<%= schema.route_prefix %>/register")
       response = html_response(conn, 200)
       assert response =~ "Register"
-      assert response =~ ~p"<%= schema.route_prefix %>/log_in"
+      assert response =~ ~p"<%= schema.route_prefix %>/log-in"
       assert response =~ ~p"<%= schema.route_prefix %>/register"
     end
 
@@ -37,7 +37,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       response = html_response(conn, 200)
       assert response =~ email
       assert response =~ ~p"<%= schema.route_prefix %>/settings"
-      assert response =~ ~p"<%= schema.route_prefix %>/log_out"
+      assert response =~ ~p"<%= schema.route_prefix %>/log-out"
     end
 
     test "render errors for invalid data", %{conn: conn} do
diff --git a/priv/templates/phx.gen.auth/registration_live_test.exs b/priv/templates/phx.gen.auth/registration_live_test.exs
index 1d1246819..8c878d301 100644
--- a/priv/templates/phx.gen.auth/registration_live_test.exs
+++ b/priv/templates/phx.gen.auth/registration_live_test.exs
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>RegistrationLiveTest do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.RegistrationTest do
   use <%= inspect context.web_module %>.ConnCase<%= test_case_options %>
 
   import Phoenix.LiveViewTest
@@ -79,7 +79,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
         lv
         |> element(~s|main a:fl-contains("Log in")|)
         |> render_click()
-        |> follow_redirect(conn, ~p"<%= schema.route_prefix %>/log_in")
+        |> follow_redirect(conn, ~p"<%= schema.route_prefix %>/log-in")
 
       assert login_html =~ "Log in"
     end
diff --git a/priv/templates/phx.gen.auth/reset_password_controller_test.exs b/priv/templates/phx.gen.auth/reset_password_controller_test.exs
index f622b51e0..dcf0dc5c9 100644
--- a/priv/templates/phx.gen.auth/reset_password_controller_test.exs
+++ b/priv/templates/phx.gen.auth/reset_password_controller_test.exs
@@ -9,19 +9,19 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     %{<%= schema.singular %>: <%= schema.singular %>_fixture()}
   end
 
-  describe "GET <%= schema.route_prefix %>/reset_password" do
+  describe "GET <%= schema.route_prefix %>/reset-password" do
     test "renders the reset password page", %{conn: conn} do
-      conn = get(conn, ~p"<%= schema.route_prefix %>/reset_password")
+      conn = get(conn, ~p"<%= schema.route_prefix %>/reset-password")
       response = html_response(conn, 200)
       assert response =~ "Forgot your password?"
     end
   end
 
-  describe "POST <%= schema.route_prefix %>/reset_password" do
+  describe "POST <%= schema.route_prefix %>/reset-password" do
     @tag :capture_log
     test "sends a new reset password token", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
       conn =
-        post(conn, ~p"<%= schema.route_prefix %>/reset_password", %{
+        post(conn, ~p"<%= schema.route_prefix %>/reset-password", %{
           "<%= schema.singular %>" => %{"email" => <%= schema.singular %>.email}
         })
 
@@ -35,7 +35,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
     test "does not send reset password token if email is invalid", %{conn: conn} do
       conn =
-        post(conn, ~p"<%= schema.route_prefix %>/reset_password", %{
+        post(conn, ~p"<%= schema.route_prefix %>/reset-password", %{
           "<%= schema.singular %>" => %{"email" => "unknown@example.com"}
         })
 
@@ -48,7 +48,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
   end
 
-  describe "GET <%= schema.route_prefix %>/reset_password/:token" do
+  describe "GET <%= schema.route_prefix %>/reset-password/:token" do
     setup %{<%= schema.singular %>: <%= schema.singular %>} do
       token =
         extract_<%= schema.singular %>_token(fn url ->
@@ -59,12 +59,12 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "renders reset password", %{conn: conn, token: token} do
-      conn = get(conn, ~p"<%= schema.route_prefix %>/reset_password/#{token}")
+      conn = get(conn, ~p"<%= schema.route_prefix %>/reset-password/#{token}")
       assert html_response(conn, 200) =~ "Reset password"
     end
 
     test "does not render reset password with invalid token", %{conn: conn} do
-      conn = get(conn, ~p"<%= schema.route_prefix %>/reset_password/oops")
+      conn = get(conn, ~p"<%= schema.route_prefix %>/reset-password/oops")
       assert redirected_to(conn) == ~p"/"
 
       assert Phoenix.Flash.get(conn.assigns.flash, :error) =~
@@ -72,7 +72,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
   end
 
-  describe "PUT <%= schema.route_prefix %>/reset_password/:token" do
+  describe "PUT <%= schema.route_prefix %>/reset-password/:token" do
     setup %{<%= schema.singular %>: <%= schema.singular %>} do
       token =
         extract_<%= schema.singular %>_token(fn url ->
@@ -84,14 +84,14 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
     test "resets password once", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>, token: token} do
       conn =
-        put(conn, ~p"<%= schema.route_prefix %>/reset_password/#{token}", %{
+        put(conn, ~p"<%= schema.route_prefix %>/reset-password/#{token}", %{
           "<%= schema.singular %>" => %{
             "password" => "new valid password",
             "password_confirmation" => "new valid password"
           }
         })
 
-      assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/log_in"
+      assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/log-in"
       refute get_session(conn, :<%= schema.singular %>_token)
 
       assert Phoenix.Flash.get(conn.assigns.flash, :info) =~
@@ -102,7 +102,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
     test "does not reset password on invalid data", %{conn: conn, token: token} do
       conn =
-        put(conn, ~p"<%= schema.route_prefix %>/reset_password/#{token}", %{
+        put(conn, ~p"<%= schema.route_prefix %>/reset-password/#{token}", %{
           "<%= schema.singular %>" => %{
             "password" => "too short",
             "password_confirmation" => "does not match"
@@ -113,7 +113,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "does not reset password with invalid token", %{conn: conn} do
-      conn = put(conn, ~p"<%= schema.route_prefix %>/reset_password/oops")
+      conn = put(conn, ~p"<%= schema.route_prefix %>/reset-password/oops")
       assert redirected_to(conn) == ~p"/"
 
       assert Phoenix.Flash.get(conn.assigns.flash, :error) =~
diff --git a/priv/templates/phx.gen.auth/reset_password_live_test.exs b/priv/templates/phx.gen.auth/reset_password_live_test.exs
index 4e4995dd3..6e73bfe8e 100644
--- a/priv/templates/phx.gen.auth/reset_password_live_test.exs
+++ b/priv/templates/phx.gen.auth/reset_password_live_test.exs
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>ResetPasswordLiveTest do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.ResetPasswordTest do
   use <%= inspect context.web_module %>.ConnCase<%= test_case_options %>
 
   import Phoenix.LiveViewTest
@@ -19,13 +19,13 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
   describe "Reset password page" do
     test "renders reset password with valid token", %{conn: conn, token: token} do
-      {:ok, _lv, html} = live(conn, ~p"<%= schema.route_prefix %>/reset_password/#{token}")
+      {:ok, _lv, html} = live(conn, ~p"<%= schema.route_prefix %>/reset-password/#{token}")
 
       assert html =~ "Reset Password"
     end
 
     test "does not render reset password with invalid token", %{conn: conn} do
-      {:error, {:redirect, to}} = live(conn, ~p"<%= schema.route_prefix %>/reset_password/invalid")
+      {:error, {:redirect, to}} = live(conn, ~p"<%= schema.route_prefix %>/reset-password/invalid")
 
       assert to == %{
                flash: %{"error" => "Reset password link is invalid or it has expired."},
@@ -34,7 +34,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "renders errors for invalid data", %{conn: conn, token: token} do
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset_password/#{token}")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset-password/#{token}")
 
       result =
         lv
@@ -50,7 +50,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
   describe "Reset Password" do
     test "resets password once", %{conn: conn, token: token, <%= schema.singular %>: <%= schema.singular %>} do
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset_password/#{token}")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset-password/#{token}")
 
       {:ok, conn} =
         lv
@@ -61,7 +61,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
           }
         )
         |> render_submit()
-        |> follow_redirect(conn, ~p"<%= schema.route_prefix %>/log_in")
+        |> follow_redirect(conn, ~p"<%= schema.route_prefix %>/log-in")
 
       refute get_session(conn, :<%= schema.singular %>_token)
       assert Phoenix.Flash.get(conn.assigns.flash, :info) =~ "Password reset successfully"
@@ -69,7 +69,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "does not reset password on invalid data", %{conn: conn, token: token} do
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset_password/#{token}")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset-password/#{token}")
 
       result =
         lv
@@ -89,13 +89,13 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
   describe "Reset password navigation" do
     test "redirects to login page when the Log in button is clicked", %{conn: conn, token: token} do
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset_password/#{token}")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset-password/#{token}")
 
       {:ok, conn} =
         lv
         |> element(~s|main a:fl-contains("Log in")|)
         |> render_click()
-        |> follow_redirect(conn, ~p"<%= schema.route_prefix %>/log_in")
+        |> follow_redirect(conn, ~p"<%= schema.route_prefix %>/log-in")
 
       assert conn.resp_body =~ "Log in"
     end
@@ -104,7 +104,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       conn: conn,
       token: token
     } do
-      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset_password/#{token}")
+      {:ok, lv, _html} = live(conn, ~p"<%= schema.route_prefix %>/reset-password/#{token}")
 
       {:ok, conn} =
         lv
diff --git a/priv/templates/phx.gen.auth/session_controller_test.exs b/priv/templates/phx.gen.auth/session_controller_test.exs
index 70473c2ce..8004208b1 100644
--- a/priv/templates/phx.gen.auth/session_controller_test.exs
+++ b/priv/templates/phx.gen.auth/session_controller_test.exs
@@ -7,9 +7,9 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     %{<%= schema.singular %>: <%= schema.singular %>_fixture()}
   end<%= if not live? do %>
 
-  describe "GET <%= schema.route_prefix %>/log_in" do
+  describe "GET <%= schema.route_prefix %>/log-in" do
     test "renders log in page", %{conn: conn} do
-      conn = get(conn, ~p"<%= schema.route_prefix %>/log_in")
+      conn = get(conn, ~p"<%= schema.route_prefix %>/log-in")
       response = html_response(conn, 200)
       assert response =~ "Log in"
       assert response =~ ~p"<%= schema.route_prefix %>/register"
@@ -17,15 +17,15 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "redirects if already logged in", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
-      conn = conn |> log_in_<%= schema.singular %>(<%= schema.singular %>) |> get(~p"<%= schema.route_prefix %>/log_in")
+      conn = conn |> log_in_<%= schema.singular %>(<%= schema.singular %>) |> get(~p"<%= schema.route_prefix %>/log-in")
       assert redirected_to(conn) == ~p"/"
     end
   end<% end %>
 
-  describe "POST <%= schema.route_prefix %>/log_in" do
+  describe "POST <%= schema.route_prefix %>/log-in" do
     test "logs the <%= schema.singular %> in", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
       conn =
-        post(conn, ~p"<%= schema.route_prefix %>/log_in", %{
+        post(conn, ~p"<%= schema.route_prefix %>/log-in", %{
           "<%= schema.singular %>" => %{"email" => <%= schema.singular %>.email, "password" => valid_<%= schema.singular %>_password()}
         })
 
@@ -37,12 +37,12 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       response = html_response(conn, 200)
       assert response =~ <%= schema.singular %>.email
       assert response =~ ~p"<%= schema.route_prefix %>/settings"
-      assert response =~ ~p"<%= schema.route_prefix %>/log_out"
+      assert response =~ ~p"<%= schema.route_prefix %>/log-out"
     end
 
     test "logs the <%= schema.singular %> in with remember me", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
       conn =
-        post(conn, ~p"<%= schema.route_prefix %>/log_in", %{
+        post(conn, ~p"<%= schema.route_prefix %>/log-in", %{
           "<%= schema.singular %>" => %{
             "email" => <%= schema.singular %>.email,
             "password" => valid_<%= schema.singular %>_password(),
@@ -58,7 +58,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       conn =
         conn
         |> init_test_session(<%= schema.singular %>_return_to: "/foo/bar")
-        |> post(~p"<%= schema.route_prefix %>/log_in", %{
+        |> post(~p"<%= schema.route_prefix %>/log-in", %{
           "<%= schema.singular %>" => %{
             "email" => <%= schema.singular %>.email,
             "password" => valid_<%= schema.singular %>_password()
@@ -72,7 +72,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     test "login following registration", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
       conn =
         conn
-        |> post(~p"<%= schema.route_prefix %>/log_in", %{
+        |> post(~p"<%= schema.route_prefix %>/log-in", %{
           "_action" => "registered",
           "<%= schema.singular %>" => %{
             "email" => <%= schema.singular %>.email,
@@ -87,8 +87,8 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     test "login following password update", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
       conn =
         conn
-        |> post(~p"<%= schema.route_prefix %>/log_in", %{
-          "_action" => "password_updated",
+        |> post(~p"<%= schema.route_prefix %>/log-in", %{
+          "_action" => "password-updated",
           "<%= schema.singular %>" => %{
             "email" => <%= schema.singular %>.email,
             "password" => valid_<%= schema.singular %>_password()
@@ -101,17 +101,17 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
     test "redirects to login page with invalid credentials", %{conn: conn} do
       conn =
-        post(conn, ~p"<%= schema.route_prefix %>/log_in", %{
+        post(conn, ~p"<%= schema.route_prefix %>/log-in", %{
           "<%= schema.singular %>" => %{"email" => "invalid@email.com", "password" => "invalid_password"}
         })
 
       assert Phoenix.Flash.get(conn.assigns.flash, :error) == "Invalid email or password"
-      assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/log_in"
+      assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/log-in"
     end<% else %>
 
     test "emits error message with invalid credentials", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
       conn =
-        post(conn, ~p"<%= schema.route_prefix %>/log_in", %{
+        post(conn, ~p"<%= schema.route_prefix %>/log-in", %{
           "<%= schema.singular %>" => %{"email" => <%= schema.singular %>.email, "password" => "invalid_password"}
         })
 
@@ -121,16 +121,16 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end<% end %>
   end
 
-  describe "DELETE <%= schema.route_prefix %>/log_out" do
+  describe "DELETE <%= schema.route_prefix %>/log-out" do
     test "logs the <%= schema.singular %> out", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
-      conn = conn |> log_in_<%= schema.singular %>(<%= schema.singular %>) |> delete(~p"<%= schema.route_prefix %>/log_out")
+      conn = conn |> log_in_<%= schema.singular %>(<%= schema.singular %>) |> delete(~p"<%= schema.route_prefix %>/log-out")
       assert redirected_to(conn) == ~p"/"
       refute get_session(conn, :<%= schema.singular %>_token)
       assert Phoenix.Flash.get(conn.assigns.flash, :info) =~ "Logged out successfully"
     end
 
     test "succeeds even if the <%= schema.singular %> is not logged in", %{conn: conn} do
-      conn = delete(conn, ~p"<%= schema.route_prefix %>/log_out")
+      conn = delete(conn, ~p"<%= schema.route_prefix %>/log-out")
       assert redirected_to(conn) == ~p"/"
       refute get_session(conn, :<%= schema.singular %>_token)
       assert Phoenix.Flash.get(conn.assigns.flash, :info) =~ "Logged out successfully"
diff --git a/priv/templates/phx.gen.auth/settings_controller_test.exs b/priv/templates/phx.gen.auth/settings_controller_test.exs
index 7c83ed554..6f5ce220d 100644
--- a/priv/templates/phx.gen.auth/settings_controller_test.exs
+++ b/priv/templates/phx.gen.auth/settings_controller_test.exs
@@ -16,7 +16,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     test "redirects if <%= schema.singular %> is not logged in" do
       conn = build_conn()
       conn = get(conn, ~p"<%= schema.route_prefix %>/settings")
-      assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/log_in"
+      assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/log-in"
     end
   end
 
@@ -96,7 +96,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
   end
 
-  describe "GET <%= schema.route_prefix %>/settings/confirm_email/:token" do
+  describe "GET <%= schema.route_prefix %>/settings/confirm-email/:token" do
     setup %{<%= schema.singular %>: <%= schema.singular %>} do
       email = unique_<%= schema.singular %>_email()
 
@@ -109,7 +109,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "updates the <%= schema.singular %> email once", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>, token: token, email: email} do
-      conn = get(conn, ~p"<%= schema.route_prefix %>/settings/confirm_email/#{token}")
+      conn = get(conn, ~p"<%= schema.route_prefix %>/settings/confirm-email/#{token}")
       assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/settings"
 
       assert Phoenix.Flash.get(conn.assigns.flash, :info) =~
@@ -118,7 +118,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       refute <%= inspect context.alias %>.get_<%= schema.singular %>_by_email(<%= schema.singular %>.email)
       assert <%= inspect context.alias %>.get_<%= schema.singular %>_by_email(email)
 
-      conn = get(conn, ~p"<%= schema.route_prefix %>/settings/confirm_email/#{token}")
+      conn = get(conn, ~p"<%= schema.route_prefix %>/settings/confirm-email/#{token}")
 
       assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/settings"
 
@@ -127,7 +127,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "does not update email with invalid token", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
-      conn = get(conn, ~p"<%= schema.route_prefix %>/settings/confirm_email/oops")
+      conn = get(conn, ~p"<%= schema.route_prefix %>/settings/confirm-email/oops")
       assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/settings"
 
       assert Phoenix.Flash.get(conn.assigns.flash, :error) =~
@@ -138,8 +138,8 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
     test "redirects if <%= schema.singular %> is not logged in", %{token: token} do
       conn = build_conn()
-      conn = get(conn, ~p"<%= schema.route_prefix %>/settings/confirm_email/#{token}")
-      assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/log_in"
+      conn = get(conn, ~p"<%= schema.route_prefix %>/settings/confirm-email/#{token}")
+      assert redirected_to(conn) == ~p"<%= schema.route_prefix %>/log-in"
     end
   end
 end
diff --git a/priv/templates/phx.gen.auth/settings_live_test.exs b/priv/templates/phx.gen.auth/settings_live_test.exs
index e4a25d1f2..32f4ebd92 100644
--- a/priv/templates/phx.gen.auth/settings_live_test.exs
+++ b/priv/templates/phx.gen.auth/settings_live_test.exs
@@ -1,4 +1,4 @@
-defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>SettingsLiveTest do
+defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web_namespace, schema.alias) %>Live.SettingsTest do
   use <%= inspect context.web_module %>.ConnCase<%= test_case_options %>
 
   alias <%= inspect context.module %>
@@ -20,7 +20,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       assert {:error, redirect} = live(conn, ~p"<%= schema.route_prefix %>/settings")
 
       assert {:redirect, %{to: path, flash: flash}} = redirect
-      assert path == ~p"<%= schema.route_prefix %>/log_in"
+      assert path == ~p"<%= schema.route_prefix %>/log-in"
       assert %{"error" => "You must log in to access this page."} = flash
     end
   end
@@ -172,7 +172,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "updates the <%= schema.singular %> email once", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>, token: token, email: email} do
-      {:error, redirect} = live(conn, ~p"<%= schema.route_prefix %>/settings/confirm_email/#{token}")
+      {:error, redirect} = live(conn, ~p"<%= schema.route_prefix %>/settings/confirm-email/#{token}")
 
       assert {:live_redirect, %{to: path, flash: flash}} = redirect
       assert path == ~p"<%= schema.route_prefix %>/settings"
@@ -182,7 +182,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
       assert <%= inspect context.alias %>.get_<%= schema.singular %>_by_email(email)
 
       # use confirm token again
-      {:error, redirect} = live(conn, ~p"<%= schema.route_prefix %>/settings/confirm_email/#{token}")
+      {:error, redirect} = live(conn, ~p"<%= schema.route_prefix %>/settings/confirm-email/#{token}")
       assert {:live_redirect, %{to: path, flash: flash}} = redirect
       assert path == ~p"<%= schema.route_prefix %>/settings"
       assert %{"error" => message} = flash
@@ -190,7 +190,7 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
     end
 
     test "does not update email with invalid token", %{conn: conn, <%= schema.singular %>: <%= schema.singular %>} do
-      {:error, redirect} = live(conn, ~p"<%= schema.route_prefix %>/settings/confirm_email/oops")
+      {:error, redirect} = live(conn, ~p"<%= schema.route_prefix %>/settings/confirm-email/oops")
       assert {:live_redirect, %{to: path, flash: flash}} = redirect
       assert path == ~p"<%= schema.route_prefix %>/settings"
       assert %{"error" => message} = flash
@@ -200,9 +200,9 @@ defmodule <%= inspect context.web_module %>.<%= inspect Module.concat(schema.web
 
     test "redirects if <%= schema.singular %> is not logged in", %{token: token} do
       conn = build_conn()
-      {:error, redirect} = live(conn, ~p"<%= schema.route_prefix %>/settings/confirm_email/#{token}")
+      {:error, redirect} = live(conn, ~p"<%= schema.route_prefix %>/settings/confirm-email/#{token}")
       assert {:redirect, %{to: path, flash: flash}} = redirect
-      assert path == ~p"<%= schema.route_prefix %>/log_in"
+      assert path == ~p"<%= schema.route_prefix %>/log-in"
       assert %{"error" => message} = flash
       assert message == "You must log in to access this page."
     end
diff --git a/test/mix/tasks/phx.gen.auth/injector_test.exs b/test/mix/tasks/phx.gen.auth/injector_test.exs
index 761493c59..6f43d5d98 100644
--- a/test/mix/tasks/phx.gen.auth/injector_test.exs
+++ b/test/mix/tasks/phx.gen.auth/injector_test.exs
@@ -680,7 +680,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.InjectorTest do
                              </li>
                              <li>
                                <.link
-                                 href={~p"/users/log_out"}
+                                 href={~p"/users/log-out"}
                                  method="delete"
                                  class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
                                >
@@ -698,7 +698,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.InjectorTest do
                              </li>
                              <li>
                                <.link
-                                 href={~p"/users/log_in"}
+                                 href={~p"/users/log-in"}
                                  class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
                                >
                                  Log in
@@ -774,7 +774,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.InjectorTest do
                              </li>\r
                              <li>\r
                                <.link\r
-                                 href={~p"/users/log_out"}\r
+                                 href={~p"/users/log-out"}\r
                                  method="delete"\r
                                  class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"\r
                                >\r
@@ -792,7 +792,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.InjectorTest do
                              </li>\r
                              <li>\r
                                <.link\r
-                                 href={~p"/users/log_in"}\r
+                                 href={~p"/users/log-in"}\r
                                  class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"\r
                                >\r
                                  Log in\r
@@ -852,7 +852,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.InjectorTest do
                        </li>
                        <li>
                          <.link
-                           href={~p"/users/log_out"}
+                           href={~p"/users/log-out"}
                            method="delete"
                            class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
                          >
@@ -870,7 +870,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.InjectorTest do
                        </li>
                        <li>
                          <.link
-                           href={~p"/users/log_in"}
+                           href={~p"/users/log-in"}
                            class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
                          >
                            Log in
@@ -932,7 +932,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.InjectorTest do
                        </li>\r
                        <li>\r
                          <.link\r
-                           href={~p"/users/log_out"}\r
+                           href={~p"/users/log-out"}\r
                            method="delete"\r
                            class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"\r
                          >\r
@@ -950,7 +950,7 @@ defmodule Mix.Tasks.Phx.Gen.Auth.InjectorTest do
                        </li>\r
                        <li>\r
                          <.link\r
-                           href={~p"/users/log_in"}\r
+                           href={~p"/users/log-in"}\r
                            class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"\r
                          >\r
                            Log in\r
@@ -983,10 +983,10 @@ defmodule Mix.Tasks.Phx.Gen.Auth.InjectorTest do
               <%= if @current_user do %>
                 <li><%= @current_user.email %></li>
                 <li><.link href={~p"/users/settings"}>Settings</.link></li>
-                <li><.link href={~p"/users/log_out"} method="delete">Log out</.link></li>
+                <li><.link href={~p"/users/log-out"} method="delete">Log out</.link></li>
               <% else %>
                 <li><.link href={~p"/users/register"}>Register</.link></li>
-                <li><.link href={~p"/users/log_in"}>Log in</.link></li>
+                <li><.link href={~p"/users/log-in"}>Log in</.link></li>
               <% end %>
             </ul>
           </div>
diff --git a/test/mix/tasks/phx.gen.auth_test.exs b/test/mix/tasks/phx.gen.auth_test.exs
index e252d1167..773ec9a27 100644
--- a/test/mix/tasks/phx.gen.auth_test.exs
+++ b/test/mix/tasks/phx.gen.auth_test.exs
@@ -161,12 +161,12 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
                    get "/users/register", UserRegistrationController, :new
                    post "/users/register", UserRegistrationController, :create
-                   get "/users/log_in", UserSessionController, :new
-                   post "/users/log_in", UserSessionController, :create
-                   get "/users/reset_password", UserResetPasswordController, :new
-                   post "/users/reset_password", UserResetPasswordController, :create
-                   get "/users/reset_password/:token", UserResetPasswordController, :edit
-                   put "/users/reset_password/:token", UserResetPasswordController, :update
+                   get "/users/log-in", UserSessionController, :new
+                   post "/users/log-in", UserSessionController, :create
+                   get "/users/reset-password", UserResetPasswordController, :new
+                   post "/users/reset-password", UserResetPasswordController, :create
+                   get "/users/reset-password/:token", UserResetPasswordController, :edit
+                   put "/users/reset-password/:token", UserResetPasswordController, :update
                  end
 
                  scope "/", MyAppWeb do
@@ -174,13 +174,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
                    get "/users/settings", UserSettingsController, :edit
                    put "/users/settings", UserSettingsController, :update
-                   get "/users/settings/confirm_email/:token", UserSettingsController, :confirm_email
+                   get "/users/settings/confirm-email/:token", UserSettingsController, :confirm_email
                  end
 
                  scope "/", MyAppWeb do
                    pipe_through [:browser]
 
-                   delete "/users/log_out", UserSessionController, :delete
+                   delete "/users/log-out", UserSessionController, :delete
                    get "/users/confirm", UserConfirmationController, :new
                    post "/users/confirm", UserConfirmationController, :create
                    get "/users/confirm/:token", UserConfirmationController, :edit
@@ -194,13 +194,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
                  ~r|<.link.*href={~p"/users/settings"}.*>|s
 
         assert file =~
-                 ~r|<.link.*href={~p"/users/log_out"}.*method="delete".*>|s
+                 ~r|<.link.*href={~p"/users/log-out"}.*method="delete".*>|s
 
         assert file =~
                  ~r|<.link.*href={~p"/users/register"}.*>|s
 
         assert file =~
-                 ~r|<.link.*href={~p"/users/log_in"}.*>|s
+                 ~r|<.link.*href={~p"/users/log-in"}.*>|s
       end)
 
       assert_file("test/support/conn_case.ex", fn file ->
@@ -249,20 +249,20 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
         assert file =~ ~s|deliver(user.email, "Update email instructions",|
       end)
 
-      assert_file("lib/my_app_web/live/user_registration_live.ex")
-      assert_file("test/my_app_web/live/user_registration_live_test.exs")
-      assert_file("lib/my_app_web/live/user_login_live.ex")
-      assert_file("test/my_app_web/live/user_login_live_test.exs")
-      assert_file("lib/my_app_web/live/user_reset_password_live.ex")
-      assert_file("test/my_app_web/live/user_reset_password_live_test.exs")
-      assert_file("lib/my_app_web/live/user_forgot_password_live.ex")
-      assert_file("test/my_app_web/live/user_forgot_password_live_test.exs")
-      assert_file("lib/my_app_web/live/user_settings_live.ex")
-      assert_file("test/my_app_web/live/user_settings_live_test.exs")
-      assert_file("lib/my_app_web/live/user_confirmation_live.ex")
-      assert_file("test/my_app_web/live/user_confirmation_live_test.exs")
-      assert_file("lib/my_app_web/live/user_confirmation_instructions_live.ex")
-      assert_file("test/my_app_web/live/user_confirmation_instructions_live_test.exs")
+      assert_file("lib/my_app_web/live/user_live/registration.ex")
+      assert_file("test/my_app_web/live/user_live/registration_test.exs")
+      assert_file("lib/my_app_web/live/user_live/login.ex")
+      assert_file("test/my_app_web/live/user_live/login_test.exs")
+      assert_file("lib/my_app_web/live/user_live/reset_password.ex")
+      assert_file("test/my_app_web/live/user_live/reset_password_test.exs")
+      assert_file("lib/my_app_web/live/user_live/forgot_password.ex")
+      assert_file("test/my_app_web/live/user_live/forgot_password_test.exs")
+      assert_file("lib/my_app_web/live/user_live/settings.ex")
+      assert_file("test/my_app_web/live/user_live/settings_test.exs")
+      assert_file("lib/my_app_web/live/user_live/confirmation.ex")
+      assert_file("test/my_app_web/live/user_live/confirmation_test.exs")
+      assert_file("lib/my_app_web/live/user_live/confirmation_instructions.ex")
+      assert_file("test/my_app_web/live/user_live/confirmation_instructions_test.exs")
 
       assert_file("lib/my_app_web/user_auth.ex")
       assert_file("test/my_app_web/user_auth_test.exs")
@@ -290,13 +290,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
                    live_session :redirect_if_user_is_authenticated,
                      on_mount: [{MyAppWeb.UserAuth, :redirect_if_user_is_authenticated}] do
-                     live "/users/register", UserRegistrationLive, :new
-                     live "/users/log_in", UserLoginLive, :new
-                     live "/users/reset_password", UserForgotPasswordLive, :new
-                     live "/users/reset_password/:token", UserResetPasswordLive, :edit
+                     live "/users/register", UserLive.Registration, :new
+                     live "/users/log-in", UserLive.Login, :new
+                     live "/users/reset-password", UserLive.ForgotPassword, :new
+                     live "/users/reset-password/:token", UserLive.ResetPassword, :edit
                    end
 
-                   post "/users/log_in", UserSessionController, :create
+                   post "/users/log-in", UserSessionController, :create
                  end
 
                  scope "/", MyAppWeb do
@@ -304,20 +304,20 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
                    live_session :require_authenticated_user,
                      on_mount: [{MyAppWeb.UserAuth, :ensure_authenticated}] do
-                     live "/users/settings", UserSettingsLive, :edit
-                     live "/users/settings/confirm_email/:token", UserSettingsLive, :confirm_email
+                     live "/users/settings", UserLive.Settings, :edit
+                     live "/users/settings/confirm-email/:token", UserLive.Settings, :confirm_email
                    end
                  end
 
                  scope "/", MyAppWeb do
                    pipe_through [:browser]
 
-                   delete "/users/log_out", UserSessionController, :delete
+                   delete "/users/log-out", UserSessionController, :delete
 
                    live_session :current_user,
                      on_mount: [{MyAppWeb.UserAuth, :mount_current_user}] do
-                     live "/users/confirm/:token", UserConfirmationLive, :edit
-                     live "/users/confirm", UserConfirmationInstructionsLive, :new
+                     live "/users/confirm/:token", UserLive.Confirmation, :edit
+                     live "/users/confirm", UserLive.ConfirmationInstructions, :new
                    end
                  end
                """
@@ -328,13 +328,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
                  ~r|<\.link.*href={~p"/users/settings"}.*>|s
 
         assert file =~
-                 ~r|<\.link.*href={~p"/users/log_out"}.*method="delete".*>|s
+                 ~r|<\.link.*href={~p"/users/log-out"}.*method="delete".*>|s
 
         assert file =~
                  ~r|<\.link.*href={~p"/users/register"}.*>|s
 
         assert file =~
-                 ~r|<\.link.*href={~p"/users/log_in"}.*>|s
+                 ~r|<\.link.*href={~p"/users/log-in"}.*>|s
       end)
 
       assert_file("test/support/conn_case.ex", fn file ->
@@ -366,13 +366,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
                  ~r|<.link.*href={~p"/users/settings"}.*>|s
 
         assert file =~
-                 ~r|<.link.*href={~p"/users/log_out"}.*method="delete".*>|s
+                 ~r|<.link.*href={~p"/users/log-out"}.*method="delete".*>|s
 
         assert file =~
                  ~r|<.link.*href={~p"/users/register"}.*>|s
 
         assert file =~
-                 ~r|<.link.*href={~p"/users/log_in"}.*>|s
+                 ~r|<.link.*href={~p"/users/log-in"}.*>|s
       end)
 
       assert_file("lib/my_app_web/router.ex", fn file ->
@@ -387,13 +387,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
                    live_session :redirect_if_user_is_authenticated,
                      on_mount: [{MyAppWeb.UserAuth, :redirect_if_user_is_authenticated}] do
-                     live "/users/register", UserRegistrationLive, :new
-                     live "/users/log_in", UserLoginLive, :new
-                     live "/users/reset_password", UserForgotPasswordLive, :new
-                     live "/users/reset_password/:token", UserResetPasswordLive, :edit
+                     live "/users/register", UserLive.Registration, :new
+                     live "/users/log-in", UserLive.Login, :new
+                     live "/users/reset-password", UserLive.ForgotPassword, :new
+                     live "/users/reset-password/:token", UserLive.ResetPassword, :edit
                    end
 
-                   post "/users/log_in", UserSessionController, :create
+                   post "/users/log-in", UserSessionController, :create
                  end
 
                  scope "/", MyAppWeb do
@@ -401,20 +401,20 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
                    live_session :require_authenticated_user,
                      on_mount: [{MyAppWeb.UserAuth, :ensure_authenticated}] do
-                     live "/users/settings", UserSettingsLive, :edit
-                     live "/users/settings/confirm_email/:token", UserSettingsLive, :confirm_email
+                     live "/users/settings", UserLive.Settings, :edit
+                     live "/users/settings/confirm-email/:token", UserLive.Settings, :confirm_email
                    end
                  end
 
                  scope "/", MyAppWeb do
                    pipe_through [:browser]
 
-                   delete "/users/log_out", UserSessionController, :delete
+                   delete "/users/log-out", UserSessionController, :delete
 
                    live_session :current_user,
                      on_mount: [{MyAppWeb.UserAuth, :mount_current_user}] do
-                     live "/users/confirm/:token", UserConfirmationLive, :edit
-                     live "/users/confirm", UserConfirmationInstructionsLive, :new
+                     live "/users/confirm/:token", UserLive.Confirmation, :edit
+                     live "/users/confirm", UserLive.ConfirmationInstructions, :new
                    end
                  end
                """
@@ -434,13 +434,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
                  ~r|<.link.*href={~p"/users/settings"}.*>|s
 
         assert file =~
-                 ~r|<.link.*href={~p"/users/log_out"}.*method="delete".*>|s
+                 ~r|<.link.*href={~p"/users/log-out"}.*method="delete".*>|s
 
         assert file =~
                  ~r|<.link.*href={~p"/users/register"}.*>|s
 
         assert file =~
-                 ~r|<.link.*href={~p"/users/log_in"}.*>|s
+                 ~r|<.link.*href={~p"/users/log-in"}.*>|s
       end)
 
       assert_file("lib/my_app_web/router.ex", fn file ->
@@ -455,12 +455,12 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
                    get "/users/register", UserRegistrationController, :new
                    post "/users/register", UserRegistrationController, :create
-                   get "/users/log_in", UserSessionController, :new
-                   post "/users/log_in", UserSessionController, :create
-                   get "/users/reset_password", UserResetPasswordController, :new
-                   post "/users/reset_password", UserResetPasswordController, :create
-                   get "/users/reset_password/:token", UserResetPasswordController, :edit
-                   put "/users/reset_password/:token", UserResetPasswordController, :update
+                   get "/users/log-in", UserSessionController, :new
+                   post "/users/log-in", UserSessionController, :create
+                   get "/users/reset-password", UserResetPasswordController, :new
+                   post "/users/reset-password", UserResetPasswordController, :create
+                   get "/users/reset-password/:token", UserResetPasswordController, :edit
+                   put "/users/reset-password/:token", UserResetPasswordController, :update
                  end
 
                  scope "/", MyAppWeb do
@@ -468,13 +468,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
                    get "/users/settings", UserSettingsController, :edit
                    put "/users/settings", UserSettingsController, :update
-                   get "/users/settings/confirm_email/:token", UserSettingsController, :confirm_email
+                   get "/users/settings/confirm-email/:token", UserSettingsController, :confirm_email
                  end
 
                  scope "/", MyAppWeb do
                    pipe_through [:browser]
 
-                   delete "/users/log_out", UserSessionController, :delete
+                   delete "/users/log-out", UserSessionController, :delete
                    get "/users/confirm", UserConfirmationController, :new
                    post "/users/confirm", UserConfirmationController, :create
                    get "/users/confirm/:token", UserConfirmationController, :edit
@@ -526,7 +526,7 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
                  ~r|<\.link.*href={~p"/warehouse/users/register"}.*>|s
 
         assert file =~
-                 ~r|<\.link.*href={~p"/warehouse/users/log_in"}.*>|s
+                 ~r|<\.link.*href={~p"/warehouse/users/log-in"}.*>|s
       end)
 
       assert_file(
@@ -548,13 +548,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
                  ~r|<\.link.*href={~p"/warehouse/users/settings"}.*>|s
 
         assert file =~
-                 ~r|<\.link.*href={~p"/warehouse/users/log_out"}.*method="delete".*>|s
+                 ~r|<\.link.*href={~p"/warehouse/users/log-out"}.*method="delete".*>|s
 
         assert file =~
                  ~r|<\.link.*href={~p"/warehouse/users/register"}.*>|s
 
         assert file =~
-                 ~r|<\.link.*href={~p"/warehouse/users/log_in"}.*>|s
+                 ~r|<\.link.*href={~p"/warehouse/users/log-in"}.*>|s
       end)
 
       assert_file(
@@ -586,7 +586,7 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
         "lib/my_app_web/controllers/warehouse/user_reset_password_html/edit.html.heex",
         fn file ->
           assert file =~
-                   ~S|<.simple_form :let={f} for={@changeset} action={~p"/warehouse/users/reset_password/#{@token}"}>|
+                   ~S|<.simple_form :let={f} for={@changeset} action={~p"/warehouse/users/reset-password/#{@token}"}>|
         end
       )
 
@@ -594,7 +594,7 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
         "lib/my_app_web/controllers/warehouse/user_reset_password_html/new.html.heex",
         fn file ->
           assert file =~
-                   ~S(<.simple_form :let={f} for={@conn.params["user"]} as={:user} action={~p"/warehouse/users/reset_password"}>)
+                   ~S(<.simple_form :let={f} for={@conn.params["user"]} as={:user} action={~p"/warehouse/users/reset-password"}>)
         end
       )
 
@@ -615,13 +615,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
       assert_file("lib/my_app_web/controllers/warehouse/user_session_html/new.html.heex", fn file ->
         assert file =~
-                 ~S|<.simple_form :let={f} for={@conn.params["user"]} as={:user} action={~p"/warehouse/users/log_in"}>|
+                 ~S|<.simple_form :let={f} for={@conn.params["user"]} as={:user} action={~p"/warehouse/users/log-in"}>|
 
         assert file =~
                  ~S|<.link navigate={~p"/warehouse/users/register"}|
 
         assert file =~
-                 ~S|<.link href={~p"/warehouse/users/reset_password"}|
+                 ~S|<.link href={~p"/warehouse/users/reset-password"}|
       end)
 
       assert_file(
@@ -677,12 +677,12 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
                    get "/users/register", UserRegistrationController, :new
                    post "/users/register", UserRegistrationController, :create
-                   get "/users/log_in", UserSessionController, :new
-                   post "/users/log_in", UserSessionController, :create
-                   get "/users/reset_password", UserResetPasswordController, :new
-                   post "/users/reset_password", UserResetPasswordController, :create
-                   get "/users/reset_password/:token", UserResetPasswordController, :edit
-                   put "/users/reset_password/:token", UserResetPasswordController, :update
+                   get "/users/log-in", UserSessionController, :new
+                   post "/users/log-in", UserSessionController, :create
+                   get "/users/reset-password", UserResetPasswordController, :new
+                   post "/users/reset-password", UserResetPasswordController, :create
+                   get "/users/reset-password/:token", UserResetPasswordController, :edit
+                   put "/users/reset-password/:token", UserResetPasswordController, :update
                  end
 
                  scope "/warehouse", MyAppWeb.Warehouse, as: :warehouse do
@@ -690,13 +690,13 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
 
                    get "/users/settings", UserSettingsController, :edit
                    put "/users/settings", UserSettingsController, :update
-                   get "/users/settings/confirm_email/:token", UserSettingsController, :confirm_email
+                   get "/users/settings/confirm-email/:token", UserSettingsController, :confirm_email
                  end
 
                  scope "/warehouse", MyAppWeb.Warehouse, as: :warehouse do
                    pipe_through [:browser]
 
-                   delete "/users/log_out", UserSessionController, :delete
+                   delete "/users/log-out", UserSessionController, :delete
                    get "/users/confirm", UserConfirmationController, :new
                    post "/users/confirm", UserConfirmationController, :create
                    get "/users/confirm/:token", UserConfirmationController, :edit
@@ -1380,7 +1380,7 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
                 </li>
                 <li>
                   <.link
-                    href={~p"/users/log_out"}
+                    href={~p"/users/log-out"}
                     method="delete"
                     class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
                   >
@@ -1398,7 +1398,7 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
                 </li>
                 <li>
                   <.link
-                    href={~p"/users/log_in"}
+                    href={~p"/users/log-in"}
                     class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
                   >
                     Log in
@@ -1444,7 +1444,7 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
                 </li>
                 <li>
                   <.link
-                    href={~p"/users/log_out"}
+                    href={~p"/users/log-out"}
                     method="delete"
                     class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
                   >
@@ -1462,7 +1462,7 @@ defmodule Mix.Tasks.Phx.Gen.AuthTest do
                 </li>
                 <li>
                   <.link
-                    href={~p"/users/log_in"}
+                    href={~p"/users/log-in"}
                     class="text-[0.8125rem] leading-6 text-zinc-900 font-semibold hover:text-zinc-700"
                   >
                     Log in
diff --git a/test/mix/tasks/phx.gen.html_test.exs b/test/mix/tasks/phx.gen.html_test.exs
index b0eb2d309..450e0599b 100644
--- a/test/mix/tasks/phx.gen.html_test.exs
+++ b/test/mix/tasks/phx.gen.html_test.exs
@@ -44,7 +44,7 @@ defmodule Mix.Tasks.Phx.Gen.HtmlTest do
     datetime = %{DateTime.utc_now() | second: 0, microsecond: {0, 6}}
 
     in_tmp_project(config.test, fn ->
-      Gen.Html.run(~w(Blog Post posts title slug:unique votes:integer cost:decimal
+      Gen.Html.run(~w(Blog Post posts title content:text slug:unique votes:integer cost:decimal
                       tags:array:text popular:boolean drafted_at:datetime
                       status:enum:unpublished:published:deleted
                       published_at:utc_datetime
@@ -110,6 +110,7 @@ defmodule Mix.Tasks.Phx.Gen.HtmlTest do
       assert_file(path, fn file ->
         assert file =~ "create table(:posts)"
         assert file =~ "add :title, :string"
+        assert file =~ "add :content, :text"
         assert file =~ "add :status, :string"
         assert file =~ "create unique_index(:posts, [:slug])"
       end)
@@ -151,6 +152,7 @@ defmodule Mix.Tasks.Phx.Gen.HtmlTest do
       assert_file("lib/phoenix_web/controllers/post_html/post_form.html.heex", fn file ->
         assert file =~ ~S(<.simple_form :let={f} for={@changeset} action={@action}>)
         assert file =~ ~s(<.input field={f[:title]} type="text")
+        assert file =~ ~s(<.input field={f[:content]} type="textarea")
         assert file =~ ~s(<.input field={f[:votes]} type="number")
         assert file =~ ~s(<.input field={f[:cost]} type="number" label="Cost" step="any")
 
diff --git a/test/mix/tasks/phx.gen.live_test.exs b/test/mix/tasks/phx.gen.live_test.exs
index e67f57a30..dd5cb4756 100644
--- a/test/mix/tasks/phx.gen.live_test.exs
+++ b/test/mix/tasks/phx.gen.live_test.exs
@@ -55,7 +55,7 @@ defmodule Mix.Tasks.Phx.Gen.LiveTest do
 
   test "generates live resource and handles existing contexts", config do
     in_tmp_live_project config.test, fn ->
-      Gen.Live.run(~w(Blog Post posts title slug:unique votes:integer cost:decimal
+      Gen.Live.run(~w(Blog Post posts title content:text slug:unique votes:integer cost:decimal
                       tags:array:text popular:boolean drafted_at:datetime
                       status:enum:unpublished:published:deleted
                       published_at:utc_datetime
@@ -88,6 +88,7 @@ defmodule Mix.Tasks.Phx.Gen.LiveTest do
       assert_file path, fn file ->
         assert file =~ "create table(:posts)"
         assert file =~ "add :title, :string"
+        assert file =~ "add :content, :text"
         assert file =~ "create unique_index(:posts, [:slug])"
       end
 
@@ -102,6 +103,7 @@ defmodule Mix.Tasks.Phx.Gen.LiveTest do
       assert_file "lib/phoenix_web/live/post_live/form.ex", fn file ->
         assert file =~ ~s(<.simple_form)
         assert file =~ ~s(<.input field={@form[:title]} type="text")
+        assert file =~ ~s(<.input field={@form[:content]} type="textarea")
         assert file =~ ~s(<.input field={@form[:votes]} type="number")
         assert file =~ ~s(<.input field={@form[:cost]} type="number" label="Cost" step="any")
         assert file =~ """
diff --git a/test/support/router_helper.exs b/test/support/router_helper.exs
index d306b3137..9cbf4be23 100644
--- a/test/support/router_helper.exs
+++ b/test/support/router_helper.exs
@@ -11,7 +11,8 @@ defmodule RouterHelper do
 
   defmacro __using__(_) do
     quote do
-      use Plug.Test
+      import Plug.Test
+      import Plug.Conn
       import RouterHelper
     end
   end