diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 209ccb585..4ff07f986 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -39,17 +39,18 @@ the following general guidelines: 1. Please test with your code and include unit tests when possible. 1. It is up to you, the contributor, to make a case for why your change is a good idea. -1. For any security issues, please **do not** open a Github Issue. Please - follow responsible disclosure practices laid out in - [SECURITY.md](SECURITY.md) +1. For any security issues, please **do not** open a Github Issue. Please follow + responsible disclosure practices laid out in [SECURITY.md](SECURITY.md) ## Quick Start -The goal of the quick start guide is to get an environment up and running quickly -to allow you to get a feel for all of the various components that make up Firezone. +The goal of the quick start guide is to get an environment up and running +quickly to allow you to get a feel for all of the various components that make +up Firezone. -Once you've verified all components are running successfully, the detailed developer -guides can help with getting you setup to develop on a specific Firezone component. +Once you've verified all components are running successfully, the detailed +developer guides can help with getting you setup to develop on a specific +Firezone component. ### Docker Setup @@ -59,11 +60,13 @@ comes with `compose` included. #### Test With Docker -When you want to test every component together the ideal way to go is to use docker. +When you want to test every component together the ideal way to go is to use +docker. To do this you first need a seeded database, for that follow the steps on the [Elixir's README](elixir/readme#running-control-plane-for-local-development). Then you can do: + ```sh # To start all the components docker compose up -d --build @@ -73,14 +76,13 @@ docker compose logs -f ``` After this you will have running: -* A portal -* A gateway connected to the portal -* A client connected to the portal -* A relay connected to the portal -* A resource on a network only with the gateway - * The ip is `172.20.0.100` -(And any other dependency for these to run) +- A portal +- A gateway connected to the portal +- A client connected to the portal +- A relay connected to the portal +- A resource on a network only with the gateway + - The ip is `172.20.0.100` (And any other dependency for these to run) ```sh # To test that a client can ping the resource @@ -107,16 +109,17 @@ docker compose run --rm elixir /bin/sh -c "cd apps/domain && mix ecto.create && docker compose up -d api web vault gateway client relay ``` -You should now be able to connect to `http://localhost:8080//sign_in` +You should now be able to connect to `http://localhost:8080/` and sign in with the following credentials: + ``` Email: firezone@localhost Password: Firezone1234 ``` The [`docker-compose.yml`](docker-compose.yml) file configures the Docker -development environment. If you make any changes you feel would benefit -all developers, feel free to open a PR to get them merged! +development environment. If you make any changes you feel would benefit all +developers, feel free to open a PR to get them merged! ### Ensure Everything Works @@ -128,20 +131,22 @@ all developers, feel free to open a PR to get them merged! ### Git Commit Signing -Firezone requires that all commits in the repository be signed. If you need assistance -setting up `git` to sign commits, please read over the Github pages for +Firezone requires that all commits in the repository be signed. If you need +assistance setting up `git` to sign commits, please read over the Github pages +for [Managing Commit signature verification](https://docs.github.com/en/authentication/managing-commit-signature-verification) ### Docker Setup -Docker is the preferred method of developing Firezone locally. It (mostly) -works cross-platform, and can be used to develop Firezone on all three -major desktop OS. +Docker is the preferred method of developing Firezone locally. It (mostly) works +cross-platform, and can be used to develop Firezone on all three major desktop +OS. -If you have followed the [Docker Setup](#docker-setup) instructions in the Quick Start -section, you can move along to the next step in the development environment setup. -If you have not read the Docker Setup instructions we recommend following the directions -listed there to get your Docker environment setup properly. +If you have followed the [Docker Setup](#docker-setup) instructions in the Quick +Start section, you can move along to the next step in the development +environment setup. If you have not read the Docker Setup instructions we +recommend following the directions listed there to get your Docker environment +setup properly. ### asdf-vm Setup @@ -150,10 +155,11 @@ language versions for Firezone. You'll need to install the language runtimes according to the versions laid out in the [.tool-versions](.tool-versions) file. If using asdf, simply run `asdf install` from the project root. -* Note: For a fresh install of `asdf` you will need to install some - [asdf-plugins](https://asdf-vm.com/manage/plugins.html). Running `asdf install` - will show which `asdf` plugins need to be installed prior to installing the - required language runtimes. + +- Note: For a fresh install of `asdf` you will need to install some + [asdf-plugins](https://asdf-vm.com/manage/plugins.html). Running + `asdf install` will show which `asdf` plugins need to be installed prior to + installing the required language runtimes. This is used to run static analysis checks during [pre-commit](#pre-commit) and for any local, non-Docker development or testing. @@ -166,21 +172,22 @@ pip: `pip install pre-commit`. ### Elixir Development -If you are interested in contributing to the Web Application/API, please read the -detailed info found in the [Elixir Developer Guide](elixir/README.md) +If you are interested in contributing to the Web Application/API, please read +the detailed info found in the [Elixir Developer Guide](elixir/README.md) ### Rust Development If you are interested in contributing to the Gateway, Relay, or client library, -please read the detailed info found in the [Rust Developer Guide](rust/README.md) +please read the detailed info found in the +[Rust Developer Guide](rust/README.md) ## Reporting Bugs We appreciate any and all bug reports. -To report a bug, please first [search for it in our issues -tracker](https://github.com/firezone/firezone/issues). Be sure to search closed -issues as well. +To report a bug, please first +[search for it in our issues tracker](https://github.com/firezone/firezone/issues). +Be sure to search closed issues as well. If it's not there, please open a new issue and include the following: @@ -202,15 +209,15 @@ swiftly, please read the below _before_ opening a pull request. Please test your code. As a contributor, it is **your** responsibility to ensure your code is bug-free, otherwise it may be rejected. It's also a good idea to -check the code coverage report to ensure your tests are covering your new -code. E.g. +check the code coverage report to ensure your tests are covering your new code. +E.g. #### Unit Tests Unit tests can be run with `mix test` from the project root. -To view line coverage information, you may run `mix coveralls.html` -which will generate an HTML coverage report in `cover/`. +To view line coverage information, you may run `mix coveralls.html` which will +generate an HTML coverage report in `cover/`. #### End-to-end Tests @@ -222,7 +229,8 @@ be manually triggered by a reviewer. This will help tremendously during our release engineering process. -Please use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#specification) +Please use the +[Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#specification) standard to write your commit message. E.g. @@ -248,4 +256,5 @@ pre-commit run --all-files ## Asking For Help -If you get stuck, don't hesitate to ask for help on our [community forums](https://discourse.firez.one/?utm_source=contributing). +If you get stuck, don't hesitate to ask for help on our +[community forums](https://discourse.firez.one/?utm_source=contributing). diff --git a/elixir/apps/web/lib/web/auth.ex b/elixir/apps/web/lib/web/auth.ex index 091666f79..8696ea6f8 100644 --- a/elixir/apps/web/lib/web/auth.ex +++ b/elixir/apps/web/lib/web/auth.ex @@ -3,7 +3,7 @@ defmodule Web.Auth do alias Domain.Auth def signed_in_path(%Auth.Subject{actor: %{type: :account_admin_user}} = subject) do - ~p"/#{subject.account.slug || subject.account}/dashboard" + ~p"/#{subject.account.slug || subject.account}/actors" end def put_subject_in_session(conn, %Auth.Subject{} = subject) do @@ -18,7 +18,7 @@ defmodule Web.Auth do @doc """ Redirects the signed in user depending on the actor type. - The account admin users are sent to dashboard or a return path if it's stored in session. + The account admin users are sent to authenticated home or a return path if it's stored in session. The account users are only expected to authenticate using client apps. If the platform is known, we direct them to the application through a deep link or an app link; @@ -56,7 +56,7 @@ defmodule Web.Auth do :info, "Please use a client application to access Firezone." ) - |> Phoenix.Controller.redirect(to: ~p"/#{conn.path_params["account_id_or_slug"]}/") + |> Phoenix.Controller.redirect(to: ~p"/#{conn.path_params["account_id_or_slug"]}") end end @@ -81,7 +81,7 @@ defmodule Web.Auth do :info, "Please use a client application to access Firezone." ) - |> Phoenix.Controller.redirect(to: ~p"/#{conn.path_params["account_id_or_slug"]}/") + |> Phoenix.Controller.redirect(to: ~p"/#{conn.path_params["account_id_or_slug"]}") end @doc """ @@ -173,7 +173,7 @@ defmodule Web.Auth do conn |> Phoenix.Controller.put_flash(:error, "You must log in to access this page.") |> maybe_store_return_to() - |> Phoenix.Controller.redirect(to: ~p"/#{conn.path_params["account_id_or_slug"]}/sign_in") + |> Phoenix.Controller.redirect(to: ~p"/#{conn.path_params["account_id_or_slug"]}") |> Plug.Conn.halt() end end @@ -260,7 +260,7 @@ defmodule Web.Auth do socket = socket |> Phoenix.LiveView.put_flash(:error, "You must log in to access this page.") - |> Phoenix.LiveView.redirect(to: ~p"/#{params["account_id_or_slug"]}/sign_in") + |> Phoenix.LiveView.redirect(to: ~p"/#{params["account_id_or_slug"]}") {:halt, socket} end diff --git a/elixir/apps/web/lib/web/components/layouts/app.html.heex b/elixir/apps/web/lib/web/components/layouts/app.html.heex index fca659809..c6e29216d 100644 --- a/elixir/apps/web/lib/web/components/layouts/app.html.heex +++ b/elixir/apps/web/lib/web/components/layouts/app.html.heex @@ -1,14 +1,6 @@ <.topbar subject={@subject} /> <.sidebar> - <.sidebar_item - current_path={@current_path} - navigate={~p"/#{@account}/dashboard"} - icon="hero-chart-bar-square-solid" - > - Dashboard - - <.sidebar_item current_path={@current_path} navigate={~p"/#{@account}/actors"} diff --git a/elixir/apps/web/lib/web/components/navigation_components.ex b/elixir/apps/web/lib/web/components/navigation_components.ex index 8748aa8fe..33c790ac5 100644 --- a/elixir/apps/web/lib/web/components/navigation_components.ex +++ b/elixir/apps/web/lib/web/components/navigation_components.ex @@ -239,8 +239,6 @@ defmodule Web.NavigationComponents do default: nil, doc: "Account assign which will be used to fetch the home path." - # TODO: remove this attribute - attr :home_path, :string, required: false, doc: "The path for to the home page for a user." slot :inner_block, required: true, doc: "Breadcrumb entries" def breadcrumbs(assigns) do @@ -249,7 +247,7 @@ defmodule Web.NavigationComponents do
  1. <.link - navigate={if @account, do: ~p"/#{@account}/dashboard", else: @home_path} + navigate={if @account, do: ~p"/#{@account}/actors", else: @home_path} class="inline-flex items-center text-gray-700 hover:text-gray-900 dark:text-gray-300 dark:hover:text-white" > <.icon name="hero-home-solid" class="w-4 h-4 mr-2" /> Home diff --git a/elixir/apps/web/lib/web/controllers/auth_controller.ex b/elixir/apps/web/lib/web/controllers/auth_controller.ex index f63373f37..98f8ed7dc 100644 --- a/elixir/apps/web/lib/web/controllers/auth_controller.ex +++ b/elixir/apps/web/lib/web/controllers/auth_controller.ex @@ -60,14 +60,14 @@ defmodule Web.AuthController do {:error, :not_found} -> conn |> put_flash(:userpass_provider_identifier, String.slice(provider_identifier, 0, 160)) - |> put_flash(:error, "You can not use this method to sign in.") - |> redirect(to: "/#{account_id_or_slug}/sign_in") + |> put_flash(:error, "You may not use this method to sign in.") + |> redirect(to: "/#{account_id_or_slug}") {:error, _reason} -> conn |> put_flash(:userpass_provider_identifier, String.slice(provider_identifier, 0, 160)) |> put_flash(:error, "Invalid username or password.") - |> redirect(to: "/#{account_id_or_slug}/sign_in") + |> redirect(to: "/#{account_id_or_slug}") end end @@ -165,13 +165,13 @@ defmodule Web.AuthController do else {:error, :not_found} -> conn - |> put_flash(:error, "You can not use this method to sign in.") - |> redirect(to: "/#{account_id_or_slug}/sign_in") + |> put_flash(:error, "You may not use this method to sign in.") + |> redirect(to: "/#{account_id_or_slug}") {:error, _reason} -> conn |> put_flash(:error, "The sign in link is invalid or expired.") - |> redirect(to: "/#{account_id_or_slug}/sign_in") + |> redirect(to: "/#{account_id_or_slug}") end end @@ -197,8 +197,8 @@ defmodule Web.AuthController do else {:error, :not_found} -> conn - |> put_flash(:error, "You can not use this method to sign in.") - |> redirect(to: "/#{account_id_or_slug}/sign_in") + |> put_flash(:error, "You may not use this method to sign in.") + |> redirect(to: "/#{account_id_or_slug}") end end @@ -245,19 +245,19 @@ defmodule Web.AuthController do else {:error, :not_found} -> conn - |> put_flash(:error, "You can not use this method to sign in.") - |> redirect(to: "/#{account_id_or_slug}/sign_in") + |> put_flash(:error, "You may not use this method to sign in.") + |> redirect(to: "/#{account_id_or_slug}") {:error, _reason} -> conn - |> put_flash(:error, "You can not authenticate to this account.") - |> redirect(to: "/#{account_id_or_slug}/sign_in") + |> put_flash(:error, "You may not authenticate to this account.") + |> redirect(to: "/#{account_id_or_slug}") end else {:error, :invalid_state, conn} -> conn |> put_flash(:error, "Your session has expired, please try again.") - |> redirect(to: "/#{account_id_or_slug}/sign_in") + |> redirect(to: "/#{account_id_or_slug}") end end @@ -282,7 +282,7 @@ defmodule Web.AuthController do "account_id_or_slug" => account_id_or_slug }) do {:ok, _identity, redirect_url} = - Domain.Auth.sign_out(subject.identity, url(~p"/#{account_id_or_slug}/sign_in")) + Domain.Auth.sign_out(subject.identity, url(~p"/#{account_id_or_slug}")) conn |> delete_recent_account() @@ -293,7 +293,7 @@ defmodule Web.AuthController do def sign_out(conn, %{"account_id_or_slug" => account_id_or_slug}) do conn |> Auth.sign_out() - |> redirect(to: ~p"/#{account_id_or_slug}/sign_in") + |> redirect(to: ~p"/#{account_id_or_slug}") end defp delete_recent_account(%{assigns: %{subject: subject}} = conn) do diff --git a/elixir/apps/web/lib/web/live/actors/edit.ex b/elixir/apps/web/lib/web/live/actors/edit.ex index 0f45f39b5..23ed46cff 100644 --- a/elixir/apps/web/lib/web/live/actors/edit.ex +++ b/elixir/apps/web/lib/web/live/actors/edit.ex @@ -45,7 +45,7 @@ defmodule Web.Actors.Edit do put_flash(socket, :error, "You don't have permissions to perform this action.")} {:error, :cant_remove_admin_type} -> - {:noreply, put_flash(socket, :error, "You can not demote the last admin.")} + {:noreply, put_flash(socket, :error, "You may not demote the last admin.")} {:error, {:unauthorized, _context}} -> {:noreply, @@ -58,7 +58,7 @@ defmodule Web.Actors.Edit do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/actors"}>Actors <.breadcrumb path={~p"/#{@account}/actors/#{@actor}"}> <%= @actor.name %> diff --git a/elixir/apps/web/lib/web/live/actors/new.ex b/elixir/apps/web/lib/web/live/actors/new.ex index 216cf18d8..cd1fa382e 100644 --- a/elixir/apps/web/lib/web/live/actors/new.ex +++ b/elixir/apps/web/lib/web/live/actors/new.ex @@ -15,7 +15,7 @@ defmodule Web.Actors.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/actors"}>Actors <.breadcrumb path={~p"/#{@account}/actors/new"}>Add diff --git a/elixir/apps/web/lib/web/live/actors/service_accounts/new.ex b/elixir/apps/web/lib/web/live/actors/service_accounts/new.ex index aff8cacb7..8b8ddf260 100644 --- a/elixir/apps/web/lib/web/live/actors/service_accounts/new.ex +++ b/elixir/apps/web/lib/web/live/actors/service_accounts/new.ex @@ -60,7 +60,7 @@ defmodule Web.Actors.ServiceAccounts.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/actors"}>Actors <.breadcrumb path={~p"/#{@account}/actors/new"}>Add <.breadcrumb path={~p"/#{@account}/actors/service_accounts/new"}>Service Account diff --git a/elixir/apps/web/lib/web/live/actors/service_accounts/new_identity.ex b/elixir/apps/web/lib/web/live/actors/service_accounts/new_identity.ex index de5bf980d..396a4a1fc 100644 --- a/elixir/apps/web/lib/web/live/actors/service_accounts/new_identity.ex +++ b/elixir/apps/web/lib/web/live/actors/service_accounts/new_identity.ex @@ -65,7 +65,7 @@ defmodule Web.Actors.ServiceAccounts.NewIdentity do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/actors"}>Actors <.breadcrumb path={~p"/#{@account}/actors/#{@actor}"}> <%= @actor.name %> diff --git a/elixir/apps/web/lib/web/live/actors/users/new.ex b/elixir/apps/web/lib/web/live/actors/users/new.ex index cf241154d..f0e4836cc 100644 --- a/elixir/apps/web/lib/web/live/actors/users/new.ex +++ b/elixir/apps/web/lib/web/live/actors/users/new.ex @@ -58,7 +58,7 @@ defmodule Web.Actors.Users.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/actors"}>Actors <.breadcrumb path={~p"/#{@account}/actors/new"}>Add <.breadcrumb path={~p"/#{@account}/actors/users/new"}>User diff --git a/elixir/apps/web/lib/web/live/actors/users/new_identity.ex b/elixir/apps/web/lib/web/live/actors/users/new_identity.ex index 092025a7d..b76e482de 100644 --- a/elixir/apps/web/lib/web/live/actors/users/new_identity.ex +++ b/elixir/apps/web/lib/web/live/actors/users/new_identity.ex @@ -64,7 +64,7 @@ defmodule Web.Actors.Users.NewIdentity do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/actors"}>Actors <.breadcrumb path={~p"/#{@account}/actors/#{@actor}"}> <%= @actor.name %> diff --git a/elixir/apps/web/lib/web/live/auth/sign_in.ex b/elixir/apps/web/lib/web/live/auth/sign_in.ex index 11b20cc4b..e2417f7ab 100644 --- a/elixir/apps/web/lib/web/live/auth/sign_in.ex +++ b/elixir/apps/web/lib/web/live/auth/sign_in.ex @@ -38,8 +38,8 @@ defmodule Web.Auth.SignIn do
    -

    - Welcome back +

    + <%= @account.name %> Admin Portal

    <.flash flash={@flash} kind={:error} /> @@ -89,6 +89,20 @@ defmodule Web.Auth.SignIn do
    +
    +

    + Don't have an account? + + Sign up here. + +

    +

    + <%= # TODO: Add link to client instructions docs %> Meant to sign in from a client instead? + + Read the docs. + +

    +
    """ @@ -201,7 +215,7 @@ defmodule Web.Auth.SignIn do focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700]}> - Log in with <%= @provider.name %> + Sign in with <%= @provider.name %> """ end diff --git a/elixir/apps/web/lib/web/live/clients/edit.ex b/elixir/apps/web/lib/web/live/clients/edit.ex index 60a2bbd09..cfe64b17d 100644 --- a/elixir/apps/web/lib/web/live/clients/edit.ex +++ b/elixir/apps/web/lib/web/live/clients/edit.ex @@ -32,7 +32,7 @@ defmodule Web.Clients.Edit do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/clients"}>Clients <.breadcrumb path={~p"/#{@account}/clients/#{@client}"}> <%= @client.name %> diff --git a/elixir/apps/web/lib/web/live/clients/index.ex b/elixir/apps/web/lib/web/live/clients/index.ex index cb409d007..d958cb775 100644 --- a/elixir/apps/web/lib/web/live/clients/index.ex +++ b/elixir/apps/web/lib/web/live/clients/index.ex @@ -13,7 +13,7 @@ defmodule Web.Clients.Index do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/clients"}>Clients <.header> diff --git a/elixir/apps/web/lib/web/live/clients/show.ex b/elixir/apps/web/lib/web/live/clients/show.ex index f7ae29773..b0bf6ad37 100644 --- a/elixir/apps/web/lib/web/live/clients/show.ex +++ b/elixir/apps/web/lib/web/live/clients/show.ex @@ -22,7 +22,7 @@ defmodule Web.Clients.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/clients"}>Clients <.breadcrumb path={~p"/#{@account}/clients/#{@client.id}"}> <%= @client.name %> diff --git a/elixir/apps/web/lib/web/live/dashboard.ex b/elixir/apps/web/lib/web/live/dashboard.ex deleted file mode 100644 index cb5b19fa7..000000000 --- a/elixir/apps/web/lib/web/live/dashboard.ex +++ /dev/null @@ -1,13 +0,0 @@ -defmodule Web.Dashboard do - use Web, :live_view - - def render(assigns) do - ~H""" -
    -
    -

    Dashboard

    -
    -
    - """ - end -end diff --git a/elixir/apps/web/lib/web/live/gateway_groups/edit.ex b/elixir/apps/web/lib/web/live/gateway_groups/edit.ex index 31ac2a9b9..e9ea2ee1e 100644 --- a/elixir/apps/web/lib/web/live/gateway_groups/edit.ex +++ b/elixir/apps/web/lib/web/live/gateway_groups/edit.ex @@ -47,7 +47,7 @@ defmodule Web.GatewayGroups.Edit do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/gateway_groups"}>Gateway Instance Groups <.breadcrumb path={~p"/#{@account}/gateway_groups/#{@group}"}> <%= @group.name_prefix %> diff --git a/elixir/apps/web/lib/web/live/gateway_groups/index.ex b/elixir/apps/web/lib/web/live/gateway_groups/index.ex index b19009693..cc3625ec7 100644 --- a/elixir/apps/web/lib/web/live/gateway_groups/index.ex +++ b/elixir/apps/web/lib/web/live/gateway_groups/index.ex @@ -22,7 +22,7 @@ defmodule Web.GatewayGroups.Index do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/gateway_groups"}>Gateway Instance Groups <.header> diff --git a/elixir/apps/web/lib/web/live/gateway_groups/new.ex b/elixir/apps/web/lib/web/live/gateway_groups/new.ex index 5b99c8f41..df4bb0289 100644 --- a/elixir/apps/web/lib/web/live/gateway_groups/new.ex +++ b/elixir/apps/web/lib/web/live/gateway_groups/new.ex @@ -52,7 +52,7 @@ defmodule Web.GatewayGroups.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/gateway_groups"}>Gateway Instance Groups <.breadcrumb path={~p"/#{@account}/gateway_groups/new"}>Add diff --git a/elixir/apps/web/lib/web/live/gateway_groups/show.ex b/elixir/apps/web/lib/web/live/gateway_groups/show.ex index ecf47940c..015e72e40 100644 --- a/elixir/apps/web/lib/web/live/gateway_groups/show.ex +++ b/elixir/apps/web/lib/web/live/gateway_groups/show.ex @@ -33,7 +33,7 @@ defmodule Web.GatewayGroups.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/gateway_groups"}>Gateway Instance Groups <.breadcrumb path={~p"/#{@account}/gateway_groups/#{@group}"}> <%= @group.name_prefix %> diff --git a/elixir/apps/web/lib/web/live/gateways/show.ex b/elixir/apps/web/lib/web/live/gateways/show.ex index ac8e9ef14..76535c801 100644 --- a/elixir/apps/web/lib/web/live/gateways/show.ex +++ b/elixir/apps/web/lib/web/live/gateways/show.ex @@ -47,7 +47,7 @@ defmodule Web.Gateways.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/gateway_groups"}>Gateway Instance Groups <.breadcrumb path={~p"/#{@account}/gateway_groups/#{@gateway.group}"}> <%= @gateway.group.name_prefix %> diff --git a/elixir/apps/web/lib/web/live/groups/edit.ex b/elixir/apps/web/lib/web/live/groups/edit.ex index 0bd2067d2..3fbe1385b 100644 --- a/elixir/apps/web/lib/web/live/groups/edit.ex +++ b/elixir/apps/web/lib/web/live/groups/edit.ex @@ -34,7 +34,7 @@ defmodule Web.Groups.Edit do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/groups"}>Groups <.breadcrumb path={~p"/#{@account}/groups/#{@group}"}> <%= @group.name %> diff --git a/elixir/apps/web/lib/web/live/groups/edit_actors.ex b/elixir/apps/web/lib/web/live/groups/edit_actors.ex index 3632111ed..3f78a0480 100644 --- a/elixir/apps/web/lib/web/live/groups/edit_actors.ex +++ b/elixir/apps/web/lib/web/live/groups/edit_actors.ex @@ -72,7 +72,7 @@ defmodule Web.Groups.EditActors do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/groups"}>Groups <.breadcrumb path={~p"/#{@account}/groups/#{@group}"}> <%= @group.name %> diff --git a/elixir/apps/web/lib/web/live/groups/index.ex b/elixir/apps/web/lib/web/live/groups/index.ex index 437f04bc2..8dd13d1cc 100644 --- a/elixir/apps/web/lib/web/live/groups/index.ex +++ b/elixir/apps/web/lib/web/live/groups/index.ex @@ -22,7 +22,7 @@ defmodule Web.Groups.Index do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/groups"}><%= @page_title %> diff --git a/elixir/apps/web/lib/web/live/groups/new.ex b/elixir/apps/web/lib/web/live/groups/new.ex index 906dcecdb..a3efe6dba 100644 --- a/elixir/apps/web/lib/web/live/groups/new.ex +++ b/elixir/apps/web/lib/web/live/groups/new.ex @@ -28,7 +28,7 @@ defmodule Web.Groups.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/groups"}>Actor Groups <.breadcrumb path={~p"/#{@account}/groups/new"}>Add diff --git a/elixir/apps/web/lib/web/live/groups/show.ex b/elixir/apps/web/lib/web/live/groups/show.ex index 63edca11a..fede1c088 100644 --- a/elixir/apps/web/lib/web/live/groups/show.ex +++ b/elixir/apps/web/lib/web/live/groups/show.ex @@ -26,7 +26,7 @@ defmodule Web.Groups.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/groups"}>Groups <.breadcrumb path={~p"/#{@account}/groups/#{@group}"}> <%= @group.name %> diff --git a/elixir/apps/web/lib/web/live/landing.ex b/elixir/apps/web/lib/web/live/landing.ex deleted file mode 100644 index a6bfaae17..000000000 --- a/elixir/apps/web/lib/web/live/landing.ex +++ /dev/null @@ -1,9 +0,0 @@ -defmodule Web.Landing do - use Web, {:live_view, layout: {Web.Layouts, :public}} - - def render(assigns) do - ~H""" - Home page for unauthenticated users and regular account users with app download links. - """ - end -end diff --git a/elixir/apps/web/lib/web/live/policies/edit.ex b/elixir/apps/web/lib/web/live/policies/edit.ex index a0d6e96b0..908cc4980 100644 --- a/elixir/apps/web/lib/web/live/policies/edit.ex +++ b/elixir/apps/web/lib/web/live/policies/edit.ex @@ -18,7 +18,7 @@ defmodule Web.Policies.Edit do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/policies"}>Policies <.breadcrumb path={~p"/#{@account}/policies/#{@policy}"}> <.policy_name policy={@policy} /> diff --git a/elixir/apps/web/lib/web/live/policies/index.ex b/elixir/apps/web/lib/web/live/policies/index.ex index 0ea0892e0..5aefd20a4 100644 --- a/elixir/apps/web/lib/web/live/policies/index.ex +++ b/elixir/apps/web/lib/web/live/policies/index.ex @@ -13,7 +13,7 @@ defmodule Web.Policies.Index do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/policies"}>Policies <.header> diff --git a/elixir/apps/web/lib/web/live/policies/new.ex b/elixir/apps/web/lib/web/live/policies/new.ex index 6a358848f..2b12ed4c0 100644 --- a/elixir/apps/web/lib/web/live/policies/new.ex +++ b/elixir/apps/web/lib/web/live/policies/new.ex @@ -23,7 +23,7 @@ defmodule Web.Policies.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/policies"}>Policies <.breadcrumb path={~p"/#{@account}/policies/new"}>Add Policy diff --git a/elixir/apps/web/lib/web/live/policies/show.ex b/elixir/apps/web/lib/web/live/policies/show.ex index c2278fa9d..4a7db924c 100644 --- a/elixir/apps/web/lib/web/live/policies/show.ex +++ b/elixir/apps/web/lib/web/live/policies/show.ex @@ -24,7 +24,7 @@ defmodule Web.Policies.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/policies"}>Policies <.breadcrumb path={~p"/#{@account}/policies/#{@policy}"}> <.policy_name policy={@policy} /> diff --git a/elixir/apps/web/lib/web/live/relay_groups/edit.ex b/elixir/apps/web/lib/web/live/relay_groups/edit.ex index 124913be0..1d0252161 100644 --- a/elixir/apps/web/lib/web/live/relay_groups/edit.ex +++ b/elixir/apps/web/lib/web/live/relay_groups/edit.ex @@ -32,7 +32,7 @@ defmodule Web.RelayGroups.Edit do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/relay_groups"}>Relay Instance Groups <.breadcrumb path={~p"/#{@account}/relay_groups/#{@group}"}> <%= @group.name %> diff --git a/elixir/apps/web/lib/web/live/relay_groups/index.ex b/elixir/apps/web/lib/web/live/relay_groups/index.ex index fbf9d71c6..ff2bcb98f 100644 --- a/elixir/apps/web/lib/web/live/relay_groups/index.ex +++ b/elixir/apps/web/lib/web/live/relay_groups/index.ex @@ -22,7 +22,7 @@ defmodule Web.RelayGroups.Index do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/relay_groups"}>Relay Instance Groups <.header> diff --git a/elixir/apps/web/lib/web/live/relay_groups/new.ex b/elixir/apps/web/lib/web/live/relay_groups/new.ex index 3a41c1767..fe9656162 100644 --- a/elixir/apps/web/lib/web/live/relay_groups/new.ex +++ b/elixir/apps/web/lib/web/live/relay_groups/new.ex @@ -39,7 +39,7 @@ defmodule Web.RelayGroups.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/relay_groups"}>Relay Instance Groups <.breadcrumb path={~p"/#{@account}/relay_groups/new"}>Add diff --git a/elixir/apps/web/lib/web/live/relay_groups/show.ex b/elixir/apps/web/lib/web/live/relay_groups/show.ex index e5d8bee2b..3d55b8779 100644 --- a/elixir/apps/web/lib/web/live/relay_groups/show.ex +++ b/elixir/apps/web/lib/web/live/relay_groups/show.ex @@ -32,7 +32,7 @@ defmodule Web.RelayGroups.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/relay_groups"}>Relay Instance Groups <.breadcrumb path={~p"/#{@account}/relay_groups/#{@group}"}> <%= @group.name %> diff --git a/elixir/apps/web/lib/web/live/relays/show.ex b/elixir/apps/web/lib/web/live/relays/show.ex index 79f89dfd9..3c08ceb78 100644 --- a/elixir/apps/web/lib/web/live/relays/show.ex +++ b/elixir/apps/web/lib/web/live/relays/show.ex @@ -40,7 +40,7 @@ defmodule Web.Relays.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/relay_groups"}>Relay Instance Groups <.breadcrumb path={~p"/#{@account}/relay_groups/#{@relay.group}"}> <%= @relay.group.name %> diff --git a/elixir/apps/web/lib/web/live/resources/edit.ex b/elixir/apps/web/lib/web/live/resources/edit.ex index 5f935bb68..ee8596009 100644 --- a/elixir/apps/web/lib/web/live/resources/edit.ex +++ b/elixir/apps/web/lib/web/live/resources/edit.ex @@ -21,7 +21,7 @@ defmodule Web.Resources.Edit do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/resources"}>Resources <.breadcrumb path={~p"/#{@account}/resources/#{@resource.id}"}> <%= @resource.name %> diff --git a/elixir/apps/web/lib/web/live/resources/index.ex b/elixir/apps/web/lib/web/live/resources/index.ex index 332eda0d3..272cd068d 100644 --- a/elixir/apps/web/lib/web/live/resources/index.ex +++ b/elixir/apps/web/lib/web/live/resources/index.ex @@ -14,7 +14,7 @@ defmodule Web.Resources.Index do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/resources"}>Resources <.header> diff --git a/elixir/apps/web/lib/web/live/resources/new.ex b/elixir/apps/web/lib/web/live/resources/new.ex index 31995d3ed..947c8ca2d 100644 --- a/elixir/apps/web/lib/web/live/resources/new.ex +++ b/elixir/apps/web/lib/web/live/resources/new.ex @@ -20,7 +20,7 @@ defmodule Web.Resources.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/resources"}>Resources <.breadcrumb path={~p"/#{@account}/resources/new"}>Add Resource diff --git a/elixir/apps/web/lib/web/live/resources/show.ex b/elixir/apps/web/lib/web/live/resources/show.ex index c3aa6b9da..2ac348f5d 100644 --- a/elixir/apps/web/lib/web/live/resources/show.ex +++ b/elixir/apps/web/lib/web/live/resources/show.ex @@ -39,7 +39,7 @@ defmodule Web.Resources.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/resources"}>Resources <.breadcrumb path={~p"/#{@account}/resources/#{@resource.id}"}> <%= @resource.name %> diff --git a/elixir/apps/web/lib/web/live/settings/account.ex b/elixir/apps/web/lib/web/live/settings/account.ex index 898d3b727..15827cbf0 100644 --- a/elixir/apps/web/lib/web/live/settings/account.ex +++ b/elixir/apps/web/lib/web/live/settings/account.ex @@ -3,7 +3,7 @@ defmodule Web.Settings.Account do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/account"}>Account Settings diff --git a/elixir/apps/web/lib/web/live/settings/dns.ex b/elixir/apps/web/lib/web/live/settings/dns.ex index afb5c1eae..ded4c65aa 100644 --- a/elixir/apps/web/lib/web/live/settings/dns.ex +++ b/elixir/apps/web/lib/web/live/settings/dns.ex @@ -3,7 +3,7 @@ defmodule Web.Settings.DNS do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/dns"}>DNS Settings <.header> diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/connect.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/connect.ex index 744197367..46efbc977 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/connect.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/connect.ex @@ -96,7 +96,7 @@ defmodule Web.Settings.IdentityProviders.GoogleWorkspace.Connect do {:error, _reason} -> conn - |> put_flash(:error, "You can not authenticate to this account.") + |> put_flash(:error, "You may not authenticate to this account.") |> redirect( to: ~p"/#{account}/settings/identity_providers/google_workspace/#{provider_id}" ) diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/edit.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/edit.ex index 135428f12..3a0d17c09 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/edit.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/edit.ex @@ -45,7 +45,7 @@ defmodule Web.Settings.IdentityProviders.GoogleWorkspace.Edit do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/new.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/new.ex index 7b64ceb54..8f3c4ff3a 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/new.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/new.ex @@ -64,7 +64,7 @@ defmodule Web.Settings.IdentityProviders.GoogleWorkspace.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/show.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/show.ex index 3efaf9523..0c0155e68 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/show.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/google_workspace/show.ex @@ -45,7 +45,7 @@ defmodule Web.Settings.IdentityProviders.GoogleWorkspace.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/index.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/index.ex index ccd9a46b1..b0464fbbb 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/index.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/index.ex @@ -26,7 +26,7 @@ defmodule Web.Settings.IdentityProviders.Index do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/new.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/new.ex index 7a3079d54..d3da72427 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/new.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/new.ex @@ -21,7 +21,7 @@ defmodule Web.Settings.IdentityProviders.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/edit.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/edit.ex index 24a61818d..ee93c842e 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/edit.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/edit.ex @@ -45,7 +45,7 @@ defmodule Web.Settings.IdentityProviders.OpenIDConnect.Edit do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/new.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/new.ex index f8435b56d..ac8002198 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/new.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/new.ex @@ -64,7 +64,7 @@ defmodule Web.Settings.IdentityProviders.OpenIDConnect.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/show.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/show.ex index e541ccc9f..2d20aba6a 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/show.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/openid_connect/show.ex @@ -45,7 +45,7 @@ defmodule Web.Settings.IdentityProviders.OpenIDConnect.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/saml/saml.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/saml/saml.ex index 71ab59515..fe62546d1 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/saml/saml.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/saml/saml.ex @@ -36,7 +36,7 @@ defmodule Web.Settings.IdentityProviders.SAML.New do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/saml/show.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/saml/show.ex index 780d3511f..cb0c8937f 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/saml/show.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/saml/show.ex @@ -20,7 +20,7 @@ defmodule Web.Settings.IdentityProviders.SAML.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/settings/identity_providers/system/show.ex b/elixir/apps/web/lib/web/live/settings/identity_providers/system/show.ex index d0935c9c3..c4d05d8ee 100644 --- a/elixir/apps/web/lib/web/live/settings/identity_providers/system/show.ex +++ b/elixir/apps/web/lib/web/live/settings/identity_providers/system/show.ex @@ -45,7 +45,7 @@ defmodule Web.Settings.IdentityProviders.System.Show do def render(assigns) do ~H""" - <.breadcrumbs home_path={~p"/#{@account}/dashboard"}> + <.breadcrumbs account={@account}> <.breadcrumb path={~p"/#{@account}/settings/identity_providers"}> Identity Providers Settings diff --git a/elixir/apps/web/lib/web/live/sign_up.ex b/elixir/apps/web/lib/web/live/sign_up.ex index 1d4367328..4b7156b7f 100644 --- a/elixir/apps/web/lib/web/live/sign_up.ex +++ b/elixir/apps/web/lib/web/live/sign_up.ex @@ -122,9 +122,9 @@ defmodule Web.SignUp do
    <.link class="font-medium text-blue-600 dark:text-blue-500 hover:underline" - navigate={~p"/#{@account.slug}/sign_in"} + navigate={~p"/#{@account.slug}"} > - <%= "#{Web.Endpoint.url()}/#{@account.slug}/sign_in" %> + <%= "#{Web.Endpoint.url()}/#{@account.slug}" %>
    diff --git a/elixir/apps/web/lib/web/router.ex b/elixir/apps/web/lib/web/router.ex index 843ccb6c1..89b9cbdf7 100644 --- a/elixir/apps/web/lib/web/router.ex +++ b/elixir/apps/web/lib/web/router.ex @@ -52,7 +52,7 @@ defmodule Web.Router do live "/", SignUp end - scope "/:account_id_or_slug/sign_in", Web do + scope "/:account_id_or_slug", Web do pipe_through [:browser, :redirect_if_user_is_authenticated] live_session :redirect_if_user_is_authenticated, @@ -64,10 +64,10 @@ defmodule Web.Router do # Adapter-specific routes ## Email - live "/providers/email/:provider_id", Auth.Email + live "/sign_in/providers/email/:provider_id", Auth.Email end - scope "/providers/:provider_id" do + scope "/sign_in/providers/:provider_id" do # UserPass post "/verify_credentials", AuthController, :verify_credentials @@ -98,8 +98,6 @@ defmodule Web.Router do {Web.Auth, :mount_account}, {Web.Nav, :set_active_sidebar_item} ] do - live "/dashboard", Dashboard - scope "/actors", Actors do live "/", Index live "/new", New @@ -212,14 +210,4 @@ defmodule Web.Router do end end end - - scope "/", Web do - pipe_through [:browser] - - live_session :landing, - on_mount: [Web.Sandbox] do - live "/:account_id_or_slug/", Landing - live "/", Landing - end - end end diff --git a/elixir/apps/web/test/web/acceptance/auth/email_test.exs b/elixir/apps/web/test/web/acceptance/auth/email_test.exs index 074fcc413..2cdaf4bb9 100644 --- a/elixir/apps/web/test/web/acceptance/auth/email_test.exs +++ b/elixir/apps/web/test/web/acceptance/auth/email_test.exs @@ -8,7 +8,7 @@ defmodule Web.Acceptance.Auth.EmailTest do Fixtures.Auth.create_email_provider(account: account) session - |> visit(~p"/#{account}/sign_in") + |> visit(~p"/#{account}") |> assert_el(Query.text("Sign in with a magic link")) |> fill_form(%{ "email[provider_identifier]" => "foo@bar.com" @@ -33,13 +33,13 @@ defmodule Web.Acceptance.Auth.EmailTest do session |> email_login_flow(account, identity.provider_identifier) |> assert_el(Query.css("#user-menu-button")) - |> assert_path(~p"/#{account.slug}/dashboard") + |> assert_path(~p"/#{account.slug}/actors") |> Auth.assert_authenticated(identity) end defp email_login_flow(session, account, email) do session - |> visit(~p"/#{account}/sign_in") + |> visit(~p"/#{account}") |> assert_el(Query.text("Sign in with a magic link")) |> fill_form(%{ "email[provider_identifier]" => email diff --git a/elixir/apps/web/test/web/acceptance/auth/openid_connect_test.exs b/elixir/apps/web/test/web/acceptance/auth/openid_connect_test.exs index 41fdc7cb6..e07cac1f0 100644 --- a/elixir/apps/web/test/web/acceptance/auth/openid_connect_test.exs +++ b/elixir/apps/web/test/web/acceptance/auth/openid_connect_test.exs @@ -12,13 +12,13 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do {:ok, _entity_id} = Vault.upsert_user(oidc_login, email, oidc_password) session - |> visit(~p"/#{account}/sign_in") - |> assert_el(Query.text("Welcome back")) - |> click(Query.link("Log in with Vault")) + |> visit(~p"/#{account}") + |> assert_el(Query.text("#{account.name} Admin Portal")) + |> click(Query.link("Sign in with Vault")) |> Vault.userpass_flow(oidc_login, oidc_password) - |> assert_el(Query.text("Welcome back")) - |> assert_path(~p"/#{account}/sign_in") - |> assert_el(Query.text("You can not authenticate to this account.")) + |> assert_el(Query.text("#{account.name} Admin Portal")) + |> assert_path(~p"/#{account}") + |> assert_el(Query.text("You may not authenticate to this account.")) end feature "authenticates existing user", %{session: session} do @@ -40,12 +40,12 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do ) session - |> visit(~p"/#{account}/sign_in") - |> assert_el(Query.text("Welcome back")) - |> click(Query.link("Log in with Vault")) + |> visit(~p"/#{account}") + |> assert_el(Query.text("#{account.name} Admin Portal")) + |> click(Query.link("Sign in with Vault")) |> Vault.userpass_flow(oidc_login, oidc_password) |> assert_el(Query.css("#user-menu-button")) |> Auth.assert_authenticated(identity) - |> assert_path(~p"/#{account.slug}/dashboard") + |> assert_path(~p"/#{account.slug}/actors") end end diff --git a/elixir/apps/web/test/web/acceptance/auth/userpass_test.exs b/elixir/apps/web/test/web/acceptance/auth/userpass_test.exs index 0b9adfe51..ca9c8f92c 100644 --- a/elixir/apps/web/test/web/acceptance/auth/userpass_test.exs +++ b/elixir/apps/web/test/web/acceptance/auth/userpass_test.exs @@ -94,7 +94,7 @@ defmodule Web.Acceptance.Auth.UserPassTest do |> assert_error_flash("Invalid username or password.") end - feature "redirects to dashboard after successful log in as account_admin_user", %{ + feature "redirects to actors index after successful log in as account_admin_user", %{ session: session } do account = Fixtures.Accounts.create_account() @@ -112,11 +112,11 @@ defmodule Web.Acceptance.Auth.UserPassTest do session |> password_login_flow(account, identity.provider_identifier, password) |> assert_el(Query.css("#user-menu-button")) - |> assert_path(~p"/#{account.slug}/dashboard") + |> assert_path(~p"/#{account.slug}/actors") |> Auth.assert_authenticated(identity) end - feature "redirects to landing page after successful log in as account_user", %{ + feature "redirects back to sign_in page after successful log in as account_user", %{ session: session } do account = Fixtures.Accounts.create_account() @@ -133,13 +133,13 @@ defmodule Web.Acceptance.Auth.UserPassTest do session |> password_login_flow(account, identity.provider_identifier, password) - |> assert_path(~p"/#{account}/") + |> assert_path(~p"/#{account}") end defp password_login_flow(session, account, username, password) do session - |> visit(~p"/#{account}/sign_in") - |> assert_el(Query.text("Welcome back")) + |> visit(~p"/#{account}") + |> assert_el(Query.text("#{account.name} Admin Portal")) |> assert_el(Query.text("Sign in with username and password")) |> fill_form(%{ "userpass[provider_identifier]" => username, diff --git a/elixir/apps/web/test/web/acceptance/auth_test.exs b/elixir/apps/web/test/web/acceptance/auth_test.exs index aefed5ec5..46741e00b 100644 --- a/elixir/apps/web/test/web/acceptance/auth_test.exs +++ b/elixir/apps/web/test/web/acceptance/auth_test.exs @@ -14,9 +14,9 @@ defmodule Web.Acceptance.AuthTest do Fixtures.Auth.start_and_create_openid_connect_provider(account: account) session - |> visit(~p"/#{account}/sign_in") - |> assert_el(Query.text("Welcome back")) - |> assert_el(Query.link("Log in with #{openid_connect_provider.name}")) + |> visit(~p"/#{account}") + |> assert_el(Query.text("#{account.name} Admin Portal")) + |> assert_el(Query.link("Sign in with #{openid_connect_provider.name}")) |> assert_el(Query.text("Sign in with username and password")) |> assert_el(Query.text("Sign in with a magic link")) end @@ -38,13 +38,13 @@ defmodule Web.Acceptance.AuthTest do session |> visit(~p"/#{account}") |> Auth.authenticate(identity) - |> visit(~p"/#{account}/dashboard") + |> visit(~p"/#{account}/actors") |> assert_el(Query.css("#user-menu-button")) |> click(Query.css("#user-menu-button")) |> click(Query.link("Sign out")) |> assert_el(Query.text("Sign in with username and password")) |> Auth.assert_unauthenticated() - |> assert_path(~p"/#{account}/sign_in") + |> assert_path(~p"/#{account}") end feature "signs out unprivileged user", %{session: session} do @@ -66,7 +66,7 @@ defmodule Web.Acceptance.AuthTest do |> visit(~p"/#{account}/sign_out") |> assert_el(Query.text("Sign in with username and password")) |> Auth.assert_unauthenticated() - |> assert_path(~p"/#{account}/sign_in") + |> assert_path(~p"/#{account}") end end @@ -87,10 +87,10 @@ defmodule Web.Acceptance.AuthTest do session |> visit(~p"/#{account}") |> Auth.authenticate(identity) - |> visit(~p"/#{account}/dashboard") + |> visit(~p"/#{account}/actors") assert text(session) == "Not Found" - assert_path(session, ~p"/#{account}/dashboard") + assert_path(session, ~p"/#{account}/actors") end end diff --git a/elixir/apps/web/test/web/auth_test.exs b/elixir/apps/web/test/web/auth_test.exs index e81664d6f..8fb3f906e 100644 --- a/elixir/apps/web/test/web/auth_test.exs +++ b/elixir/apps/web/test/web/auth_test.exs @@ -25,8 +25,8 @@ defmodule Web.AuthTest do end describe "signed_in_path/1" do - test "redirects to dashboard after sign in as account admin", %{admin_subject: subject} do - assert signed_in_path(subject) == ~p"/#{subject.account.slug}/dashboard" + test "redirects to actors index after sign in as account admin", %{admin_subject: subject} do + assert signed_in_path(subject) == ~p"/#{subject.account.slug}/actors" end end @@ -179,7 +179,7 @@ defmodule Web.AuthTest do |> ensure_authenticated([]) assert conn.halted - assert redirected_to(conn) == ~p"/#{account.slug}/sign_in" + assert redirected_to(conn) == ~p"/#{account.slug}" assert Phoenix.Flash.get(conn.assigns.flash, :error) == "You must log in to access this page." @@ -349,7 +349,7 @@ defmodule Web.AuthTest do assert is_nil(updated_socket.assigns.subject) - assert updated_socket.redirected == {:redirect, %{to: ~p"/#{subject.account.slug}/sign_in"}} + assert updated_socket.redirected == {:redirect, %{to: ~p"/#{subject.account.slug}"}} end test "redirects to login page if there isn't a session_token", %{ @@ -365,7 +365,7 @@ defmodule Web.AuthTest do assert is_nil(updated_socket.assigns.subject) - assert updated_socket.redirected == {:redirect, %{to: ~p"/#{subject.account.slug}/sign_in"}} + assert updated_socket.redirected == {:redirect, %{to: ~p"/#{subject.account.slug}"}} end end @@ -404,7 +404,7 @@ defmodule Web.AuthTest do on_mount(:redirect_if_user_is_authenticated, params, session, socket) assert updated_socket.redirected == - {:redirect, %{to: ~p"/#{subject.account.slug}/dashboard"}} + {:redirect, %{to: ~p"/#{subject.account.slug}/actors"}} end test "doesn't redirect if there is no authenticated user", %{ diff --git a/elixir/apps/web/test/web/controllers/auth_controller_test.exs b/elixir/apps/web/test/web/controllers/auth_controller_test.exs index 2d39c3718..2841722db 100644 --- a/elixir/apps/web/test/web/controllers/auth_controller_test.exs +++ b/elixir/apps/web/test/web/controllers/auth_controller_test.exs @@ -19,8 +19,8 @@ defmodule Web.AuthControllerTest do } }) - assert redirected_to(conn) == "/#{account_id}/sign_in" - assert flash(conn, :error) == "You can not use this method to sign in." + assert redirected_to(conn) == "/#{account_id}" + assert flash(conn, :error) == "You may not use this method to sign in." end test "redirects back to the form when identity does not exist", %{conn: conn} do @@ -38,7 +38,7 @@ defmodule Web.AuthControllerTest do } ) - assert redirected_to(conn) == "/#{provider.account_id}/sign_in" + assert redirected_to(conn) == "/#{provider.account_id}" assert flash(conn, :error) == "Invalid username or password." assert flash(conn, :userpass_provider_identifier) == "foo" end @@ -69,7 +69,7 @@ defmodule Web.AuthControllerTest do } ) - assert redirected_to(conn) == "/#{account.id}/sign_in" + assert redirected_to(conn) == "/#{account.id}" assert flash(conn, :error) == "Invalid username or password." assert flash(conn, :userpass_provider_identifier) == identity.provider_identifier end @@ -90,7 +90,7 @@ defmodule Web.AuthControllerTest do } ) - assert redirected_to(conn) == "/#{provider.account_id}/sign_in" + assert redirected_to(conn) == "/#{provider.account_id}" assert flash(conn, :error) == "Invalid username or password." assert flash(conn, :userpass_provider_identifier) == @@ -135,7 +135,7 @@ defmodule Web.AuthControllerTest do assert is_nil(get_session(conn, :user_return_to)) end - test "redirects to the dashboard when credentials are valid and return path is empty", %{ + test "redirects to the actors index when credentials are valid and return path is empty", %{ conn: conn } do account = Fixtures.Accounts.create_account() @@ -162,7 +162,7 @@ defmodule Web.AuthControllerTest do } ) - assert redirected_to(conn) == ~p"/#{account.slug}/dashboard" + assert redirected_to(conn) == ~p"/#{account.slug}/actors" end test "renews the session when credentials are valid", %{conn: conn} do @@ -307,7 +307,7 @@ defmodule Web.AuthControllerTest do "info" => "Please use a client application to access Firezone." } - assert redirected_to(conn) == ~p"/#{account.id}/" + assert redirected_to(conn) == ~p"/#{account.id}" assert is_nil(get_session(conn, :user_return_to)) end @@ -461,8 +461,8 @@ defmodule Web.AuthControllerTest do "secret" => "foo" }) - assert redirected_to(conn) == "/#{account_id}/sign_in" - assert flash(conn, :error) == "You can not use this method to sign in." + assert redirected_to(conn) == "/#{account_id}" + assert flash(conn, :error) == "You may not use this method to sign in." end test "redirects back to the form when identity does not exist", %{conn: conn} do @@ -478,7 +478,7 @@ defmodule Web.AuthControllerTest do } ) - assert redirected_to(conn) == "/#{provider.account_id}/sign_in" + assert redirected_to(conn) == "/#{provider.account_id}" assert flash(conn, :error) == "The sign in link is invalid or expired." end @@ -493,7 +493,7 @@ defmodule Web.AuthControllerTest do "secret" => "bar" }) - assert redirected_to(conn) == ~p"/#{account}/sign_in" + assert redirected_to(conn) == ~p"/#{account}" assert flash(conn, :error) == "The sign in link is invalid or expired." end @@ -524,7 +524,7 @@ defmodule Web.AuthControllerTest do } ) - assert redirected_to(conn) == ~p"/#{account}/sign_in" + assert redirected_to(conn) == ~p"/#{account}" assert flash(conn, :error) == "The sign in link is invalid or expired." end @@ -554,7 +554,7 @@ defmodule Web.AuthControllerTest do } ) - assert redirected_to(conn) == ~p"/#{account}/sign_in" + assert redirected_to(conn) == ~p"/#{account}" assert flash(conn, :error) == "The sign in link is invalid or expired." end @@ -622,7 +622,7 @@ defmodule Web.AuthControllerTest do assert is_nil(get_session(conn, :user_return_to)) end - test "redirects to the dashboard when credentials are valid and return path is empty", %{ + test "redirects to the actors index when credentials are valid and return path is empty", %{ conn: conn } do account = Fixtures.Accounts.create_account() @@ -645,7 +645,7 @@ defmodule Web.AuthControllerTest do "secret" => email_token }) - assert redirected_to(conn) == ~p"/#{account.slug}/dashboard" + assert redirected_to(conn) == ~p"/#{account.slug}/actors" end test "redirects to the platform link when credentials are valid for account users", %{ @@ -800,8 +800,8 @@ defmodule Web.AuthControllerTest do conn = get(conn, ~p"/#{account_id}/sign_in/providers/#{provider_id}/redirect") - assert redirected_to(conn) == "/#{account_id}/sign_in" - assert flash(conn, :error) == "You can not use this method to sign in." + assert redirected_to(conn) == "/#{account_id}" + assert flash(conn, :error) == "You may not use this method to sign in." end test "redirects to IdP when provider exists", %{conn: conn} do @@ -876,7 +876,7 @@ defmodule Web.AuthControllerTest do "code" => "bar" }) - assert redirected_to(conn) == "/#{account_id}/sign_in" + assert redirected_to(conn) == "/#{account_id}" assert flash(conn, :error) == "Your session has expired, please try again." end @@ -899,7 +899,7 @@ defmodule Web.AuthControllerTest do "code" => "bar" }) - assert redirected_to(conn) == ~p"/#{account}/sign_in" + assert redirected_to(conn) == ~p"/#{account}" assert flash(conn, :error) == "Your session has expired, please try again." end @@ -933,11 +933,11 @@ defmodule Web.AuthControllerTest do "code" => "bar" }) - assert redirected_to(conn) == ~p"/#{account}/sign_in" - assert flash(conn, :error) == "You can not use this method to sign in." + assert redirected_to(conn) == ~p"/#{account}" + assert flash(conn, :error) == "You may not use this method to sign in." end - test "redirects to the dashboard when credentials are valid and return path is empty", %{ + test "redirects to the actors index when credentials are valid and return path is empty", %{ account: account, provider: provider, bypass: bypass, @@ -970,7 +970,7 @@ defmodule Web.AuthControllerTest do "code" => "MyFakeCode" }) - assert redirected_to(conn) == ~p"/#{account.slug}/dashboard" + assert redirected_to(conn) == ~p"/#{account.slug}/actors" assert %{ "live_socket_id" => "actors_sessions:" <> socket_id, @@ -1085,7 +1085,7 @@ defmodule Web.AuthControllerTest do |> put_session(:preferred_locale, "en_US") |> get(~p"/#{account}/sign_out") - assert redirected_to(conn) == url(~p"/#{account}/sign_in") + assert redirected_to(conn) == url(~p"/#{account}") assert conn.private.plug_session == %{"preferred_locale" => "en_US"} assert %{"fz_recent_account_ids" => fz_recent_account_ids} = conn.cookies @@ -1105,7 +1105,7 @@ defmodule Web.AuthControllerTest do |> authorize_conn(identity) |> get(~p"/#{account}/sign_out") - post_redirect_url = URI.encode_www_form(url(~p"/#{account}/sign_in")) + post_redirect_url = URI.encode_www_form(url(~p"/#{account}")) assert redirect_url = redirected_to(conn) assert redirect_url =~ "https://example.com" @@ -1129,7 +1129,7 @@ defmodule Web.AuthControllerTest do |> put_session(:live_socket_id, live_socket_id) |> get(~p"/#{account}/sign_out") - assert redirected_to(conn) == ~p"/#{account}/sign_in" + assert redirected_to(conn) == ~p"/#{account}" assert_receive %Phoenix.Socket.Broadcast{event: "disconnect", topic: ^live_socket_id} end @@ -1172,7 +1172,7 @@ defmodule Web.AuthControllerTest do |> put_session(:preferred_locale, "en_US") |> get(~p"/#{account}/sign_out") - assert redirected_to(conn) == url(~p"/#{account}/sign_in") + assert redirected_to(conn) == url(~p"/#{account}") assert conn.private.plug_session == %{"preferred_locale" => "en_US"} assert %{"fz_recent_account_ids" => fz_recent_account_ids} = conn.cookies @@ -1187,7 +1187,7 @@ defmodule Web.AuthControllerTest do |> put_session(:preferred_locale, "en_US") |> get(~p"/#{account}/sign_out") - assert redirected_to(conn) == ~p"/#{account}/sign_in" + assert redirected_to(conn) == ~p"/#{account}" assert conn.private.plug_session == %{"preferred_locale" => "en_US"} refute Map.has_key?(conn.cookies, "fz_recent_account_ids") diff --git a/elixir/apps/web/test/web/live/actors/edit_test.exs b/elixir/apps/web/test/web/live/actors/edit_test.exs index 646e653b4..2a9966990 100644 --- a/elixir/apps/web/test/web/live/actors/edit_test.exs +++ b/elixir/apps/web/test/web/live/actors/edit_test.exs @@ -23,7 +23,7 @@ defmodule Web.Live.Actors.EditTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end @@ -173,7 +173,7 @@ defmodule Web.Live.Actors.EditTest do assert lv |> form("form", actor: attrs) - |> render_submit() =~ "You can not demote the last admin." + |> render_submit() =~ "You may not demote the last admin." end test "updates an actor on valid attrs", %{ @@ -236,7 +236,7 @@ defmodule Web.Live.Actors.EditTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/actors/index_test.exs b/elixir/apps/web/test/web/live/actors/index_test.exs index 98b633822..d0561bfba 100644 --- a/elixir/apps/web/test/web/live/actors/index_test.exs +++ b/elixir/apps/web/test/web/live/actors/index_test.exs @@ -16,7 +16,7 @@ defmodule Web.Live.Actors.IndexTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/actors/new_test.exs b/elixir/apps/web/test/web/live/actors/new_test.exs index 44719fb9e..8f5dca0bb 100644 --- a/elixir/apps/web/test/web/live/actors/new_test.exs +++ b/elixir/apps/web/test/web/live/actors/new_test.exs @@ -16,7 +16,7 @@ defmodule Web.Live.Actors.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/actors/service_accounts/new_identity_test.exs b/elixir/apps/web/test/web/live/actors/service_accounts/new_identity_test.exs index 7f2def1c5..06b1df2d7 100644 --- a/elixir/apps/web/test/web/live/actors/service_accounts/new_identity_test.exs +++ b/elixir/apps/web/test/web/live/actors/service_accounts/new_identity_test.exs @@ -33,7 +33,7 @@ defmodule Web.Live.Actors.ServiceAccounts.NewIdentityTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/actors/service_accounts/new_test.exs b/elixir/apps/web/test/web/live/actors/service_accounts/new_test.exs index e02eafb49..08ba7d285 100644 --- a/elixir/apps/web/test/web/live/actors/service_accounts/new_test.exs +++ b/elixir/apps/web/test/web/live/actors/service_accounts/new_test.exs @@ -24,7 +24,7 @@ defmodule Web.Live.Actors.ServiceAccount.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/actors/show_test.exs b/elixir/apps/web/test/web/live/actors/show_test.exs index a597c4d7e..0b7e08f14 100644 --- a/elixir/apps/web/test/web/live/actors/show_test.exs +++ b/elixir/apps/web/test/web/live/actors/show_test.exs @@ -9,7 +9,7 @@ defmodule Web.Live.Actors.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/actors/users/new_identity_test.exs b/elixir/apps/web/test/web/live/actors/users/new_identity_test.exs index 2c9aa9c09..a9fcdb4c2 100644 --- a/elixir/apps/web/test/web/live/actors/users/new_identity_test.exs +++ b/elixir/apps/web/test/web/live/actors/users/new_identity_test.exs @@ -25,7 +25,7 @@ defmodule Web.Live.Actors.User.NewIdentityTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/actors/users/new_test.exs b/elixir/apps/web/test/web/live/actors/users/new_test.exs index 423312a39..c1b1dcb16 100644 --- a/elixir/apps/web/test/web/live/actors/users/new_test.exs +++ b/elixir/apps/web/test/web/live/actors/users/new_test.exs @@ -24,7 +24,7 @@ defmodule Web.Live.Actors.User.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/auth/sign_in_test.exs b/elixir/apps/web/test/web/live/auth/sign_in_test.exs index 73cbd7ed4..49fb3cc10 100644 --- a/elixir/apps/web/test/web/live/auth/sign_in_test.exs +++ b/elixir/apps/web/test/web/live/auth/sign_in_test.exs @@ -8,21 +8,21 @@ defmodule Web.Auth.SignInTest do email_provider = Fixtures.Auth.create_email_provider(account: account) - {:ok, _lv, html} = live(conn, ~p"/#{account}/sign_in") + {:ok, _lv, html} = live(conn, ~p"/#{account}") assert html =~ "Sign in with a magic link" refute html =~ "Sign in with username and password" userpass_provider = Fixtures.Auth.create_userpass_provider(account: account) - {:ok, _lv, html} = live(conn, ~p"/#{account}/sign_in") + {:ok, _lv, html} = live(conn, ~p"/#{account}") assert html =~ "Sign in with username and password" refute html =~ "Vault" Fixtures.Auth.start_and_create_openid_connect_provider(name: "Vault", account: account) - {:ok, _lv, html} = live(conn, ~p"/#{account}/sign_in") + {:ok, _lv, html} = live(conn, ~p"/#{account}") assert html =~ "Vault" @@ -36,11 +36,11 @@ defmodule Web.Auth.SignInTest do subject = Fixtures.Auth.create_subject(identity: identity) {:ok, _provider} = Domain.Auth.disable_provider(userpass_provider, subject) - {:ok, _lv, html} = live(conn, ~p"/#{account}/sign_in") + {:ok, _lv, html} = live(conn, ~p"/#{account}") refute html =~ "Sign in with username and password" {:ok, _provider} = Domain.Auth.delete_provider(email_provider, subject) - {:ok, _lv, html} = live(conn, ~p"/#{account}/sign_in") + {:ok, _lv, html} = live(conn, ~p"/#{account}") refute html =~ "Sign in with a magic link" assert html =~ "Vault" diff --git a/elixir/apps/web/test/web/live/clients/edit_test.exs b/elixir/apps/web/test/web/live/clients/edit_test.exs index ced695ae9..04adc59e2 100644 --- a/elixir/apps/web/test/web/live/clients/edit_test.exs +++ b/elixir/apps/web/test/web/live/clients/edit_test.exs @@ -25,7 +25,7 @@ defmodule Web.Live.Clients.EditTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/clients/index_test.exs b/elixir/apps/web/test/web/live/clients/index_test.exs index c611b9881..e6ebf67cc 100644 --- a/elixir/apps/web/test/web/live/clients/index_test.exs +++ b/elixir/apps/web/test/web/live/clients/index_test.exs @@ -16,7 +16,7 @@ defmodule Web.Live.Clients.IndexTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/clients/show_test.exs b/elixir/apps/web/test/web/live/clients/show_test.exs index f1d948955..cda844768 100644 --- a/elixir/apps/web/test/web/live/clients/show_test.exs +++ b/elixir/apps/web/test/web/live/clients/show_test.exs @@ -27,7 +27,7 @@ defmodule Web.Live.Clients.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/gateway_groups/edit_test.exs b/elixir/apps/web/test/web/live/gateway_groups/edit_test.exs index 4889475c3..98b327ef2 100644 --- a/elixir/apps/web/test/web/live/gateway_groups/edit_test.exs +++ b/elixir/apps/web/test/web/live/gateway_groups/edit_test.exs @@ -25,7 +25,7 @@ defmodule Web.Live.GatewayGroups.EditTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/gateway_groups/index_test.exs b/elixir/apps/web/test/web/live/gateway_groups/index_test.exs index 98d344d84..6a2a9870a 100644 --- a/elixir/apps/web/test/web/live/gateway_groups/index_test.exs +++ b/elixir/apps/web/test/web/live/gateway_groups/index_test.exs @@ -16,7 +16,7 @@ defmodule Web.Live.GatewayGroups.IndexTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/gateway_groups/new_test.exs b/elixir/apps/web/test/web/live/gateway_groups/new_test.exs index 87ac4bf91..13462f3a7 100644 --- a/elixir/apps/web/test/web/live/gateway_groups/new_test.exs +++ b/elixir/apps/web/test/web/live/gateway_groups/new_test.exs @@ -21,7 +21,7 @@ defmodule Web.Live.GatewayGroups.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/gateway_groups/show_test.exs b/elixir/apps/web/test/web/live/gateway_groups/show_test.exs index 93f72b6f6..a238fb237 100644 --- a/elixir/apps/web/test/web/live/gateway_groups/show_test.exs +++ b/elixir/apps/web/test/web/live/gateway_groups/show_test.exs @@ -30,7 +30,7 @@ defmodule Web.Live.GatewayGroups.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/gateways/show_test.exs b/elixir/apps/web/test/web/live/gateways/show_test.exs index e5106b4c5..b75322645 100644 --- a/elixir/apps/web/test/web/live/gateways/show_test.exs +++ b/elixir/apps/web/test/web/live/gateways/show_test.exs @@ -28,7 +28,7 @@ defmodule Web.Live.Gateways.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/groups/edit_actors_test.exs b/elixir/apps/web/test/web/live/groups/edit_actors_test.exs index 743f6a654..cb87bfc09 100644 --- a/elixir/apps/web/test/web/live/groups/edit_actors_test.exs +++ b/elixir/apps/web/test/web/live/groups/edit_actors_test.exs @@ -24,7 +24,7 @@ defmodule Web.Live.Groups.EditActorsTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/groups/edit_test.exs b/elixir/apps/web/test/web/live/groups/edit_test.exs index f732106e9..aba88110e 100644 --- a/elixir/apps/web/test/web/live/groups/edit_test.exs +++ b/elixir/apps/web/test/web/live/groups/edit_test.exs @@ -25,7 +25,7 @@ defmodule Web.Live.Groups.EditTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/groups/index_test.exs b/elixir/apps/web/test/web/live/groups/index_test.exs index 3de3286d1..b7797f452 100644 --- a/elixir/apps/web/test/web/live/groups/index_test.exs +++ b/elixir/apps/web/test/web/live/groups/index_test.exs @@ -16,7 +16,7 @@ defmodule Web.Live.Groups.IndexTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/groups/new_test.exs b/elixir/apps/web/test/web/live/groups/new_test.exs index 4b27db46d..eb61e8b16 100644 --- a/elixir/apps/web/test/web/live/groups/new_test.exs +++ b/elixir/apps/web/test/web/live/groups/new_test.exs @@ -21,7 +21,7 @@ defmodule Web.Live.Groups.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/groups/show_test.exs b/elixir/apps/web/test/web/live/groups/show_test.exs index da0e419b7..1e2e19be0 100644 --- a/elixir/apps/web/test/web/live/groups/show_test.exs +++ b/elixir/apps/web/test/web/live/groups/show_test.exs @@ -25,7 +25,7 @@ defmodule Web.Live.Groups.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/policies/edit_test.exs b/elixir/apps/web/test/web/live/policies/edit_test.exs index e9ead1b09..3b4d45a2d 100644 --- a/elixir/apps/web/test/web/live/policies/edit_test.exs +++ b/elixir/apps/web/test/web/live/policies/edit_test.exs @@ -35,7 +35,7 @@ defmodule Web.Live.Policies.EditTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/policies/index_test.exs b/elixir/apps/web/test/web/live/policies/index_test.exs index 1559c742a..a6d95fd1d 100644 --- a/elixir/apps/web/test/web/live/policies/index_test.exs +++ b/elixir/apps/web/test/web/live/policies/index_test.exs @@ -16,7 +16,7 @@ defmodule Web.Live.Policies.IndexTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/policies/new_test.exs b/elixir/apps/web/test/web/live/policies/new_test.exs index 6513c1080..1819ab2af 100644 --- a/elixir/apps/web/test/web/live/policies/new_test.exs +++ b/elixir/apps/web/test/web/live/policies/new_test.exs @@ -21,7 +21,7 @@ defmodule Web.Live.Policies.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/policies/show_test.exs b/elixir/apps/web/test/web/live/policies/show_test.exs index ac9931248..32d65350e 100644 --- a/elixir/apps/web/test/web/live/policies/show_test.exs +++ b/elixir/apps/web/test/web/live/policies/show_test.exs @@ -38,7 +38,7 @@ defmodule Web.Live.Policies.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/relay_groups/edit_test.exs b/elixir/apps/web/test/web/live/relay_groups/edit_test.exs index 7fc159c78..7375e644a 100644 --- a/elixir/apps/web/test/web/live/relay_groups/edit_test.exs +++ b/elixir/apps/web/test/web/live/relay_groups/edit_test.exs @@ -25,7 +25,7 @@ defmodule Web.Live.RelayGroups.EditTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/relay_groups/index_test.exs b/elixir/apps/web/test/web/live/relay_groups/index_test.exs index 3f71e4441..3bb629877 100644 --- a/elixir/apps/web/test/web/live/relay_groups/index_test.exs +++ b/elixir/apps/web/test/web/live/relay_groups/index_test.exs @@ -16,7 +16,7 @@ defmodule Web.Live.RelayGroups.IndexTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/relay_groups/new_test.exs b/elixir/apps/web/test/web/live/relay_groups/new_test.exs index f8e320ca2..0ac3721b0 100644 --- a/elixir/apps/web/test/web/live/relay_groups/new_test.exs +++ b/elixir/apps/web/test/web/live/relay_groups/new_test.exs @@ -21,7 +21,7 @@ defmodule Web.Live.RelayGroups.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/relay_groups/show_test.exs b/elixir/apps/web/test/web/live/relay_groups/show_test.exs index 48b0b5a8b..edecc18ed 100644 --- a/elixir/apps/web/test/web/live/relay_groups/show_test.exs +++ b/elixir/apps/web/test/web/live/relay_groups/show_test.exs @@ -30,7 +30,7 @@ defmodule Web.Live.RelayGroups.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/relays/show_test.exs b/elixir/apps/web/test/web/live/relays/show_test.exs index 28d3a1608..b33546ddb 100644 --- a/elixir/apps/web/test/web/live/relays/show_test.exs +++ b/elixir/apps/web/test/web/live/relays/show_test.exs @@ -28,7 +28,7 @@ defmodule Web.Live.Relays.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/resources/edit_test.exs b/elixir/apps/web/test/web/live/resources/edit_test.exs index 199a4a86c..552afb46b 100644 --- a/elixir/apps/web/test/web/live/resources/edit_test.exs +++ b/elixir/apps/web/test/web/live/resources/edit_test.exs @@ -26,7 +26,7 @@ defmodule Web.Live.Resources.EditTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/resources/index_test.exs b/elixir/apps/web/test/web/live/resources/index_test.exs index 00b0b7f0e..6ccc8b70a 100644 --- a/elixir/apps/web/test/web/live/resources/index_test.exs +++ b/elixir/apps/web/test/web/live/resources/index_test.exs @@ -16,7 +16,7 @@ defmodule Web.Live.Resources.IndexTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/resources/new_test.exs b/elixir/apps/web/test/web/live/resources/new_test.exs index b29562f0f..687bec57d 100644 --- a/elixir/apps/web/test/web/live/resources/new_test.exs +++ b/elixir/apps/web/test/web/live/resources/new_test.exs @@ -21,7 +21,7 @@ defmodule Web.Live.Resources.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/resources/show_test.exs b/elixir/apps/web/test/web/live/resources/show_test.exs index 1d09baa6e..0cce8147a 100644 --- a/elixir/apps/web/test/web/live/resources/show_test.exs +++ b/elixir/apps/web/test/web/live/resources/show_test.exs @@ -38,7 +38,7 @@ defmodule Web.Live.Resources.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/settings/account/index_test.exs b/elixir/apps/web/test/web/live/settings/account/index_test.exs index 5ac076aea..1d7c228ec 100644 --- a/elixir/apps/web/test/web/live/settings/account/index_test.exs +++ b/elixir/apps/web/test/web/live/settings/account/index_test.exs @@ -18,7 +18,7 @@ defmodule Web.Live.Settings.Account.IndexTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/connect_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/connect_test.exs index 035bfa030..a02793448 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/connect_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/connect_test.exs @@ -32,7 +32,7 @@ defmodule Web.Live.Settings.IdentityProviders.GoogleWorkspace.Connect do ~p"/#{account_id}/settings/identity_providers/google_workspace/#{provider_id}/redirect" ) - assert redirected_to(conn) == "/#{account_id}/sign_in" + assert redirected_to(conn) == "/#{account_id}" assert flash(conn, :error) == "You must log in to access this page." end @@ -116,7 +116,7 @@ defmodule Web.Live.Settings.IdentityProviders.GoogleWorkspace.Connect do "code" => "bar" }) - assert redirected_to(conn) == "/#{account_id}/sign_in" + assert redirected_to(conn) == "/#{account_id}" assert flash(conn, :error) == "Your session has expired, please try again." end @@ -148,7 +148,7 @@ defmodule Web.Live.Settings.IdentityProviders.GoogleWorkspace.Connect do assert flash(conn, :error) == "Your session has expired, please try again." end - test "redirects to the dashboard when credentials are valid and return path is empty", %{ + test "redirects to the actors index when credentials are valid and return path is empty", %{ account: account, conn: conn } do diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/edit_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/edit_test.exs index 8fcd71cd1..8153a1785 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/edit_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/edit_test.exs @@ -33,7 +33,7 @@ defmodule Web.Live.Settings.IdentityProviders.GoogleWorkspace.EditTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/new_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/new_test.exs index 0105cb321..7fe8b99f9 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/new_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/new_test.exs @@ -23,7 +23,7 @@ defmodule Web.Live.Settings.IdentityProviders.GoogleWorkspace.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/show_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/show_test.exs index 5a53a3bc9..ad1dd0219 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/show_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/google_workspace/show_test.exs @@ -30,7 +30,7 @@ defmodule Web.Live.Settings.IdentityProviders.GoogleWorkspace.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/index_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/index_test.exs index 7087f7daa..bbcb6fb6a 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/index_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/index_test.exs @@ -28,7 +28,7 @@ defmodule Web.Live.Settings.IdentityProviders.IndexTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/new_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/new_test.exs index fe0c8b959..5eeb70bf0 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/new_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/new_test.exs @@ -26,7 +26,7 @@ defmodule Web.Live.Settings.IdentityProviders.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/connect_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/connect_test.exs index 7c55703ec..0919291ed 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/connect_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/connect_test.exs @@ -32,7 +32,7 @@ defmodule Web.Live.Settings.IdentityProviders.OpenIDConnect.Connect do ~p"/#{account_id}/settings/identity_providers/openid_connect/#{provider_id}/redirect" ) - assert redirected_to(conn) == "/#{account_id}/sign_in" + assert redirected_to(conn) == "/#{account_id}" assert flash(conn, :error) == "You must log in to access this page." end @@ -108,7 +108,7 @@ defmodule Web.Live.Settings.IdentityProviders.OpenIDConnect.Connect do "code" => "bar" }) - assert redirected_to(conn) == "/#{account_id}/sign_in" + assert redirected_to(conn) == "/#{account_id}" assert flash(conn, :error) == "Your session has expired, please try again." end @@ -140,7 +140,7 @@ defmodule Web.Live.Settings.IdentityProviders.OpenIDConnect.Connect do assert flash(conn, :error) == "Your session has expired, please try again." end - test "redirects to the dashboard when credentials are valid and return path is empty", %{ + test "redirects to the actors index when credentials are valid and return path is empty", %{ account: account, conn: conn } do diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/edit_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/edit_test.exs index baf27ca7d..217a5c05b 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/edit_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/edit_test.exs @@ -30,7 +30,7 @@ defmodule Web.Live.Settings.IdentityProviders.OpenIDConnect.EditTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/new_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/new_test.exs index 8d20019bf..4cbe34391 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/new_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/new_test.exs @@ -23,7 +23,7 @@ defmodule Web.Live.Settings.IdentityProviders.OpenIDConnect.NewTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/show_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/show_test.exs index a04413b5c..8e8d0dc2d 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/show_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/openid_connect/show_test.exs @@ -30,7 +30,7 @@ defmodule Web.Live.Settings.IdentityProviders.OpenIDConnect.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/elixir/apps/web/test/web/live/settings/identity_providers/system/show_test.exs b/elixir/apps/web/test/web/live/settings/identity_providers/system/show_test.exs index 46a7fb42c..d3c210395 100644 --- a/elixir/apps/web/test/web/live/settings/identity_providers/system/show_test.exs +++ b/elixir/apps/web/test/web/live/settings/identity_providers/system/show_test.exs @@ -26,7 +26,7 @@ defmodule Web.Live.Settings.IdentityProviders.System.ShowTest do {:error, {:redirect, %{ - to: ~p"/#{account}/sign_in", + to: ~p"/#{account}", flash: %{"error" => "You must log in to access this page."} }}} end diff --git a/kotlin/android/PortalMock/server.rb b/kotlin/android/PortalMock/server.rb index 267467900..4d674c432 100755 --- a/kotlin/android/PortalMock/server.rb +++ b/kotlin/android/PortalMock/server.rb @@ -7,7 +7,7 @@ require 'sinatra' set :bind, '0.0.0.0' set :port, 4568 -get '/:slug/sign_in' do +get '/:slug' do csrfToken = params['client_csrf_token'] ERB.new("

    Auth page

    Proceed") .result(binding) diff --git a/kotlin/android/app/src/main/java/dev/firezone/android/features/auth/ui/AuthViewModel.kt b/kotlin/android/app/src/main/java/dev/firezone/android/features/auth/ui/AuthViewModel.kt index 7c201805d..e3bc852c0 100644 --- a/kotlin/android/app/src/main/java/dev/firezone/android/features/auth/ui/AuthViewModel.kt +++ b/kotlin/android/app/src/main/java/dev/firezone/android/features/auth/ui/AuthViewModel.kt @@ -36,7 +36,7 @@ internal class AuthViewModel @Inject constructor( ViewAction.NavigateToSignInFragment } else { ViewAction.LaunchAuthFlow( - url = "$AUTH_URL${config.accountId}/sign_in?client_csrf_token=$csrfToken&client_platform=android", + url = "$AUTH_URL${config.accountId}?client_csrf_token=$csrfToken&client_platform=android", ) }, ) diff --git a/swift/apple/FirezoneKit/Sources/FirezoneKit/AuthClient/AuthClient.swift b/swift/apple/FirezoneKit/Sources/FirezoneKit/AuthClient/AuthClient.swift index 69b56c6fb..d22932847 100644 --- a/swift/apple/FirezoneKit/Sources/FirezoneKit/AuthClient/AuthClient.swift +++ b/swift/apple/FirezoneKit/Sources/FirezoneKit/AuthClient/AuthClient.swift @@ -44,9 +44,7 @@ private final class WebAuthenticationSession: NSObject, try await withCheckedThrowingContinuation { continuation in let callbackURLScheme = "firezone" let session = ASWebAuthenticationSession( - url: host.appendingPathComponent("sign_in") - - .appendingQueryItem(URLQueryItem(name: "client_platform", value: "apple")), + url: host.appendingQueryItem(URLQueryItem(name: "client_platform", value: "apple")), callbackURLScheme: callbackURLScheme ) { callbackURL, error in if let error { diff --git a/swift/apple/PortalMock/server.rb b/swift/apple/PortalMock/server.rb index c323541d5..b3334c58a 100755 --- a/swift/apple/PortalMock/server.rb +++ b/swift/apple/PortalMock/server.rb @@ -6,7 +6,7 @@ require 'erb' set :bind, '0.0.0.0' set :port, 4568 -get '/:slug/sign_in' do +get '/:slug' do ERB.new("

    Auth page

    Proceed") .result(binding) end