refactor(portal): log in -> sign in (#3577)

Just making naming a little more consistent
This commit is contained in:
Jamil
2024-02-06 07:26:09 -08:00
committed by GitHub
parent 0d5b230020
commit af69e841bc
53 changed files with 61 additions and 61 deletions

View File

@@ -465,7 +465,7 @@ defmodule Web.Auth do
redirect_params = maybe_store_return_to(conn)
conn
|> Phoenix.Controller.put_flash(:error, "You must log in to access this page.")
|> Phoenix.Controller.put_flash(:error, "You must sign in to access this page.")
|> Phoenix.Controller.redirect(
to: ~p"/#{conn.path_params["account_id_or_slug"]}?#{redirect_params}"
)
@@ -558,7 +558,7 @@ defmodule Web.Auth do
else
socket =
socket
|> Phoenix.LiveView.put_flash(:error, "You must log in to access this page.")
|> Phoenix.LiveView.put_flash(:error, "You must sign in to access this page.")
|> Phoenix.LiveView.redirect(to: ~p"/#{params["account_id_or_slug"]}")
{:halt, socket}

View File

@@ -34,7 +34,7 @@ defmodule Web.Actors.New do
account={@account}
type={:user}
name="User"
description="Admin or regular user accounts can be used to log in to Firezone and access private resources."
description="Admin or regular user accounts can be used to sign in to Firezone and access private resources."
/>
<.option
account={@account}

View File

@@ -17,7 +17,7 @@ defmodule Web.Acceptance.SignIn.EmailTest do
|> assert_el(Query.text("Please check your email"))
end
feature "allows to log in using email link to the portal", %{session: session} do
feature "allows to sign in using email link to the portal", %{session: session} do
Domain.Config.put_env_override(:outbound_email_adapter_configured?, true)
account = Fixtures.Accounts.create_account()
@@ -37,7 +37,7 @@ defmodule Web.Acceptance.SignIn.EmailTest do
|> Auth.assert_authenticated(identity)
end
feature "allows to log in using email link to the client", %{session: session} do
feature "allows to sign in using email link to the client", %{session: session} do
Domain.Config.put_env_override(:outbound_email_adapter_configured?, true)
nonce = Ecto.UUID.generate()
state = Ecto.UUID.generate()
@@ -83,7 +83,7 @@ defmodule Web.Acceptance.SignIn.EmailTest do
assert {:ok, _subject} = Domain.Auth.authenticate(token, context)
end
feature "allows to log in using email link to the client even with active browser session", %{
feature "allows to sign in using email link to the client even with active browser session", %{
session: session
} do
Auth.mock_client_sign_in_callback()

View File

@@ -139,7 +139,7 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do
assert {:ok, _subject} = Domain.Auth.authenticate(token, context)
end
feature "allows to log in to the browser and then to the client", %{
feature "allows to sign in to the browser and then to the client", %{
session: session
} do
nonce = Ecto.UUID.generate()
@@ -201,7 +201,7 @@ defmodule Web.Acceptance.Auth.OpenIDConnectTest do
assert account_id == account.id
end
feature "allows to log in to the client and then to the browser", %{
feature "allows to sign in to the client and then to the browser", %{
session: session
} do
nonce = Ecto.UUID.generate()

View File

@@ -94,7 +94,7 @@ defmodule Web.Acceptance.Auth.UserPassTest do
|> assert_error_flash("Invalid username or password.")
end
feature "redirects to actors index after successful log in as account_admin_user", %{
feature "redirects to actors index after successful sign in as account_admin_user", %{
session: session
} do
account = Fixtures.Accounts.create_account()
@@ -116,7 +116,7 @@ defmodule Web.Acceptance.Auth.UserPassTest do
|> Auth.assert_authenticated(identity)
end
feature "redirects back to sign_in page after successful log in as account_user", %{
feature "redirects back to sign_in page after successful sign in as account_user", %{
session: session
} do
account = Fixtures.Accounts.create_account()
@@ -138,7 +138,7 @@ defmodule Web.Acceptance.Auth.UserPassTest do
|> assert_error_flash("Please use a client application to access Firezone.")
end
feature "redirects to client deep link after successful log in as account_admin_user", %{
feature "redirects to client deep link after successful sign in as account_admin_user", %{
session: session
} do
nonce = Ecto.UUID.generate()
@@ -193,7 +193,7 @@ defmodule Web.Acceptance.Auth.UserPassTest do
assert {:ok, _subject} = Domain.Auth.authenticate(token, context)
end
feature "allows to log in using email link to the client even with active browser session", %{
feature "allows to sign in using email link to the client even with active browser session", %{
session: session
} do
nonce = Ecto.UUID.generate()

View File

@@ -812,7 +812,7 @@ defmodule Web.AuthTest do
assert redirected_to(conn) =~ ~p"/#{account.slug}?redirect_to="
assert Phoenix.Flash.get(conn.assigns.flash, :error) ==
"You must log in to access this page."
"You must sign in to access this page."
end
test "stores the path to redirect to on GET", %{conn: conn, account: account} do

View File

@@ -26,7 +26,7 @@ defmodule Web.Live.Actors.EditTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end
@@ -242,7 +242,7 @@ defmodule Web.Live.Actors.EditTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -19,7 +19,7 @@ defmodule Web.Live.Actors.IndexTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -19,7 +19,7 @@ defmodule Web.Live.Actors.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -34,7 +34,7 @@ defmodule Web.Live.Actors.ServiceAccounts.NewIdentityTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -27,7 +27,7 @@ defmodule Web.Live.Actors.ServiceAccount.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -12,7 +12,7 @@ defmodule Web.Live.Actors.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -35,7 +35,7 @@ defmodule Web.Live.Actors.User.NewIdentityTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -27,7 +27,7 @@ defmodule Web.Live.Actors.User.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -28,7 +28,7 @@ defmodule Web.Live.Clients.EditTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -19,7 +19,7 @@ defmodule Web.Live.Clients.IndexTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -30,7 +30,7 @@ defmodule Web.Live.Clients.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -31,7 +31,7 @@ defmodule Web.Live.Gateways.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -27,7 +27,7 @@ defmodule Web.Live.Groups.EditActorsTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -28,7 +28,7 @@ defmodule Web.Live.Groups.EditTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -19,7 +19,7 @@ defmodule Web.Live.Groups.IndexTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -24,7 +24,7 @@ defmodule Web.Live.Groups.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -28,7 +28,7 @@ defmodule Web.Live.Groups.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -38,7 +38,7 @@ defmodule Web.Live.Policies.EditTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -19,7 +19,7 @@ defmodule Web.Live.Policies.IndexTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -26,7 +26,7 @@ defmodule Web.Live.Policies.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -41,7 +41,7 @@ defmodule Web.Live.Policies.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -28,7 +28,7 @@ defmodule Web.Live.RelayGroups.EditTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -19,7 +19,7 @@ defmodule Web.Live.RelayGroups.IndexTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -24,7 +24,7 @@ defmodule Web.Live.RelayGroups.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -33,7 +33,7 @@ defmodule Web.Live.RelayGroups.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -31,7 +31,7 @@ defmodule Web.Live.Relays.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -37,7 +37,7 @@ defmodule Web.Live.Resources.EditTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -19,7 +19,7 @@ defmodule Web.Live.Resources.IndexTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -28,7 +28,7 @@ defmodule Web.Live.Resources.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -41,7 +41,7 @@ defmodule Web.Live.Resources.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -21,7 +21,7 @@ defmodule Web.Live.Settings.Account.IndexTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -21,7 +21,7 @@ defmodule Web.Live.Settings.DNS.IndexTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -33,7 +33,7 @@ defmodule Web.Live.Settings.IdentityProviders.GoogleWorkspace.Connect do
)
assert redirected_to(conn) =~ ~p"/#{account_id}"
assert flash(conn, :error) == "You must log in to access this page."
assert flash(conn, :error) == "You must sign in to access this page."
end
test "redirects with an error when provider does not exist", %{identity: identity, conn: conn} do

View File

@@ -33,7 +33,7 @@ defmodule Web.Live.Settings.IdentityProviders.GoogleWorkspace.EditTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -26,7 +26,7 @@ defmodule Web.Live.Settings.IdentityProviders.GoogleWorkspace.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -32,7 +32,7 @@ defmodule Web.Live.Settings.IdentityProviders.GoogleWorkspace.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -30,7 +30,7 @@ defmodule Web.Live.Settings.IdentityProviders.IndexTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -28,7 +28,7 @@ defmodule Web.Live.Settings.IdentityProviders.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -33,7 +33,7 @@ defmodule Web.Live.Settings.IdentityProviders.OpenIDConnect.Connect do
)
assert redirected_to(conn) =~ "/#{account_id}?redirect_to="
assert flash(conn, :error) == "You must log in to access this page."
assert flash(conn, :error) == "You must sign in to access this page."
end
test "redirects with an error when provider does not exist", %{identity: identity, conn: conn} do

View File

@@ -32,7 +32,7 @@ defmodule Web.Live.Settings.IdentityProviders.OpenIDConnect.EditTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -26,7 +26,7 @@ defmodule Web.Live.Settings.IdentityProviders.OpenIDConnect.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -31,7 +31,7 @@ defmodule Web.Live.Settings.IdentityProviders.OpenIDConnect.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -29,7 +29,7 @@ defmodule Web.Live.Settings.IdentityProviders.System.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -28,7 +28,7 @@ defmodule Web.Live.Sites.EditTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -19,7 +19,7 @@ defmodule Web.Live.Sites.IndexTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -24,7 +24,7 @@ defmodule Web.Live.Sites.NewTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end

View File

@@ -33,7 +33,7 @@ defmodule Web.Live.Sites.ShowTest do
{:redirect,
%{
to: ~p"/#{account}?#{%{redirect_to: path}}",
flash: %{"error" => "You must log in to access this page."}
flash: %{"error" => "You must sign in to access this page."}
}}}
end