diff --git a/apps/login/locales/de.json b/apps/login/locales/de.json index fc3e1557d..30a8c1240 100644 --- a/apps/login/locales/de.json +++ b/apps/login/locales/de.json @@ -22,7 +22,7 @@ "loginname": { "title": "Willkommen zurück!", "description": "Geben Sie Ihre Anmeldedaten ein.", - "register": "Neuen Benutzer registrieren", + "register": "Konto erstellen", "submit": "Weiter" }, "password": { @@ -186,6 +186,8 @@ "title": "Registrierung fehlgeschlagen", "description": "Einige Daten fehlen. Bitte überprüfen Sie Ihre Eingaben." }, + "alreadyRegistered": "Bereits ein Konto?", + "loginNow": "Hier anmelden.", "title": "Registrieren", "description": "Erstellen Sie Ihr ZITADEL-Konto.", "noMethodAvailableWarning": "Keine Authentifizierungsmethode verfügbar. Bitte wenden Sie sich an den Administrator.", @@ -201,6 +203,11 @@ "submit": "Weiter" } }, + "waitlist": { + "title": "Willkommen!", + "subtitle": "Lass uns loslegen", + "description": "Erstellen Sie Ihr kostenloses Konto mit nur wenigen Angaben" + }, "invite": { "title": "Benutzer einladen", "description": "Geben Sie die E-Mail-Adresse des Benutzers ein, den Sie einladen möchten.", diff --git a/apps/login/locales/en.json b/apps/login/locales/en.json index 10fb7b723..322b0eaa1 100644 --- a/apps/login/locales/en.json +++ b/apps/login/locales/en.json @@ -22,7 +22,7 @@ "loginname": { "title": "Welcome", "description": "Choose your login method:", - "register": "Request access", + "register": "Create account", "submit": "Continue", "notRegistered": "Not registered?", "termsOfService": "By continuing, you agree to Datum's Terms of Service and Privacy Policy, and to receive periodic emails with updates." @@ -188,7 +188,7 @@ "title": "Missing data", "description": "Provide email, first and last name to register." }, - "alreadyRegistered": "Have an invitation?", + "alreadyRegistered": "Already have an account?", "loginNow": "Log in here.", "onWaitListQuestion": "Still on the waitlist? ", "onWaitListInfo": "We'll email you when it's your turn!", @@ -208,8 +208,9 @@ } }, "waitlist": { - "title": "Get on the waitlist", - "description": "Choose how you’ll log in so you can access Datum as soon as the doors open - no extra setup needed." + "title": "Welcome!", + "subtitle": "Let's get you started", + "description": "Create your free account with just a few details" }, "invite": { "title": "Invite User", diff --git a/apps/login/locales/es.json b/apps/login/locales/es.json index 89e3150d6..1c5693b94 100644 --- a/apps/login/locales/es.json +++ b/apps/login/locales/es.json @@ -22,7 +22,7 @@ "loginname": { "title": "¡Bienvenido de nuevo!", "description": "Introduce tus datos de acceso.", - "register": "Registrar nuevo usuario", + "register": "Crear cuenta", "submit": "Continuar" }, "password": { @@ -186,6 +186,8 @@ "title": "Datos faltantes", "description": "No se proporcionaron datos suficientes para el registro." }, + "alreadyRegistered": "¿Ya tienes una cuenta?", + "loginNow": "Inicia sesión aquí.", "title": "Registrarse", "description": "Crea tu cuenta ZITADEL.", "noMethodAvailableWarning": "No hay métodos de autenticación disponibles. Por favor, contacta a tu administrador.", @@ -201,6 +203,11 @@ "submit": "Continuar" } }, + "waitlist": { + "title": "¡Bienvenido!", + "subtitle": "Empecemos", + "description": "Crea tu cuenta gratuita con solo unos pocos detalles" + }, "invite": { "title": "Invitar usuario", "description": "Introduce el correo electrónico del usuario que deseas invitar.", diff --git a/apps/login/locales/it.json b/apps/login/locales/it.json index 7ef87fcae..01d10f90d 100644 --- a/apps/login/locales/it.json +++ b/apps/login/locales/it.json @@ -22,7 +22,7 @@ "loginname": { "title": "Bentornato!", "description": "Inserisci i tuoi dati di accesso.", - "register": "Registrati come nuovo utente", + "register": "Crea account", "submit": "Continua" }, "password": { @@ -186,6 +186,8 @@ "title": "Registrazione", "description": "Inserisci i tuoi dati per registrarti." }, + "alreadyRegistered": "Hai già un account?", + "loginNow": "Accedi qui.", "title": "Registrati", "description": "Crea il tuo account ZITADEL.", "noMethodAvailableWarning": "Nessun metodo di autenticazione disponibile. Contatta l'amministratore di sistema per assistenza.", @@ -201,6 +203,11 @@ "submit": "Continua" } }, + "waitlist": { + "title": "Benvenuto!", + "subtitle": "Iniziamo", + "description": "Crea il tuo account gratuito con pochi dettagli" + }, "invite": { "title": "Invita Utente", "description": "Inserisci l'indirizzo email dell'utente che desideri invitare.", diff --git a/apps/login/locales/pl.json b/apps/login/locales/pl.json index d917d6ee9..026fdf51e 100644 --- a/apps/login/locales/pl.json +++ b/apps/login/locales/pl.json @@ -22,7 +22,7 @@ "loginname": { "title": "Witamy ponownie!", "description": "Wprowadź dane logowania.", - "register": "Zarejestruj nowego użytkownika", + "register": "Utwórz konto", "submit": "Kontynuuj" }, "password": { @@ -186,6 +186,8 @@ "title": "Brak danych", "description": "Podaj e-mail, imię i nazwisko, aby się zarejestrować." }, + "alreadyRegistered": "Masz już konto?", + "loginNow": "Zaloguj się tutaj.", "title": "Rejestracja", "description": "Utwórz konto ZITADEL.", "noMethodAvailableWarning": "Brak dostępnych metod uwierzytelniania. Skontaktuj się z administratorem.", @@ -201,6 +203,11 @@ "submit": "Kontynuuj" } }, + "waitlist": { + "title": "Witaj!", + "subtitle": "Zacznijmy", + "description": "Utwórz swoje darmowe konto za pomocą kilku informacji" + }, "invite": { "title": "Zaproś użytkownika", "description": "Podaj adres e-mail oraz imię i nazwisko użytkownika, którego chcesz zaprosić.", diff --git a/apps/login/locales/ru.json b/apps/login/locales/ru.json index b43f3e03f..e1a49a076 100644 --- a/apps/login/locales/ru.json +++ b/apps/login/locales/ru.json @@ -22,7 +22,7 @@ "loginname": { "title": "С возвращением!", "description": "Введите свои данные для входа.", - "register": "Зарегистрировать нового пользователя", + "register": "Создать аккаунт", "submit": "Продолжить" }, "password": { @@ -186,6 +186,8 @@ "title": "Недостаточно данных", "description": "Укажите email, имя и фамилию для регистрации." }, + "alreadyRegistered": "Уже есть аккаунт?", + "loginNow": "Войти здесь.", "title": "Регистрация", "description": "Создайте свой аккаунт ZITADEL.", "noMethodAvailableWarning": "Нет доступных методов аутентификации. Обратитесь к администратору.", @@ -201,6 +203,11 @@ "submit": "Продолжить" } }, + "waitlist": { + "title": "Добро пожаловать!", + "subtitle": "Давайте начнём", + "description": "Создайте бесплатную учётную запись всего за несколько шагов" + }, "invite": { "title": "Пригласить пользователя", "description": "Укажите email и имя пользователя для приглашения.", diff --git a/apps/login/locales/zh.json b/apps/login/locales/zh.json index e5391b2b6..439b1d6ce 100644 --- a/apps/login/locales/zh.json +++ b/apps/login/locales/zh.json @@ -22,7 +22,7 @@ "loginname": { "title": "欢迎回来!", "description": "请输入您的登录信息。", - "register": "注册新用户", + "register": "创建账户", "submit": "继续" }, "password": { @@ -186,6 +186,8 @@ "title": "缺少数据", "description": "请提供所有必需的数据。" }, + "alreadyRegistered": "已有账户?", + "loginNow": "在此登录。", "title": "注册", "description": "创建您的 ZITADEL 账户。", "noMethodAvailableWarning": "没有可用的认证方法。请联系您的系统管理员。", @@ -201,6 +203,11 @@ "submit": "继续" } }, + "waitlist": { + "title": "欢迎!", + "subtitle": "让我们开始吧", + "description": "只需几个细节即可创建您的免费账户" + }, "invite": { "title": "邀请用户", "description": "提供您想邀请的用户的电子邮箱地址和姓名。", diff --git a/apps/login/src/app/(main)/(boxed)/idp/[provider]/success/page.tsx b/apps/login/src/app/(main)/(boxed)/idp/[provider]/success/page.tsx index 880f9862f..56abe81bb 100644 --- a/apps/login/src/app/(main)/(boxed)/idp/[provider]/success/page.tsx +++ b/apps/login/src/app/(main)/(boxed)/idp/[provider]/success/page.tsx @@ -261,6 +261,7 @@ export default async function Page(props: { { idpIntentId: id, idpIntentToken: token }, requestId, onSuccessRedirectTo, + idpInformation.idpId, ); } @@ -328,6 +329,7 @@ export default async function Page(props: { { idpIntentId: id, idpIntentToken: token }, requestId, onSuccessRedirectTo, + idpInformation.idpId, ); } } @@ -383,6 +385,8 @@ export default async function Page(props: { foundUser.userId, { idpIntentId: id, idpIntentToken: token }, requestId, + undefined, + idpInformation.idpId, ); } } @@ -487,6 +491,7 @@ export default async function Page(props: { userId={newUser.userId} idpIntent={{ idpIntentId: id, idpIntentToken: token }} requestId={requestId} + idpId={idpInformation.idpId} /> ); diff --git a/apps/login/src/app/(main)/(illustration)/register/_login-btn.tsx b/apps/login/src/app/(main)/(illustration)/register/_login-btn.tsx index 67ae7b16c..06e2c644a 100644 --- a/apps/login/src/app/(main)/(illustration)/register/_login-btn.tsx +++ b/apps/login/src/app/(main)/(illustration)/register/_login-btn.tsx @@ -19,12 +19,6 @@ export const LoginBtn = () => { -
- - - - -
); }; diff --git a/apps/login/src/app/(main)/(illustration)/register/page.tsx b/apps/login/src/app/(main)/(illustration)/register/page.tsx index 1fd7ebe14..6ce085c84 100644 --- a/apps/login/src/app/(main)/(illustration)/register/page.tsx +++ b/apps/login/src/app/(main)/(illustration)/register/page.tsx @@ -60,8 +60,11 @@ export default async function Page(props: { return ( <> -

+

+

+

+

diff --git a/apps/login/src/components/idp-signin.tsx b/apps/login/src/components/idp-signin.tsx index c8f23fdba..4a2d72d0f 100644 --- a/apps/login/src/components/idp-signin.tsx +++ b/apps/login/src/components/idp-signin.tsx @@ -8,13 +8,13 @@ import { Alert } from "./alert"; type Props = { userId: string; - // organization: string; idpIntent: { idpIntentId: string; idpIntentToken: string; }; requestId?: string; onSuccessRedirectTo?: string; + idpId?: string; }; export function IdpSignin({ @@ -22,6 +22,7 @@ export function IdpSignin({ idpIntent: { idpIntentId, idpIntentToken }, requestId, onSuccessRedirectTo, + idpId, }: Props) { const [isPending, startTransition] = useTransition(); const [error, setError] = useState(null); @@ -37,6 +38,7 @@ export function IdpSignin({ idpIntentToken, }, requestId, + idpId, }) .then((response) => { if (response && "error" in response && response?.error) { diff --git a/apps/login/src/components/idps/pages/linking-success.tsx b/apps/login/src/components/idps/pages/linking-success.tsx index 843c3fb16..056863795 100644 --- a/apps/login/src/components/idps/pages/linking-success.tsx +++ b/apps/login/src/components/idps/pages/linking-success.tsx @@ -6,6 +6,7 @@ export async function linkingSuccess( idpIntent: { idpIntentId: string; idpIntentToken: string }, requestId?: string, onSuccessRedirectTo?: string, + idpId?: string, ) { return ( <> @@ -21,6 +22,7 @@ export async function linkingSuccess( idpIntent={idpIntent} requestId={requestId} onSuccessRedirectTo={onSuccessRedirectTo} + idpId={idpId} /> ); diff --git a/apps/login/src/components/idps/pages/login-success.tsx b/apps/login/src/components/idps/pages/login-success.tsx index b3ab8579b..dae394a10 100644 --- a/apps/login/src/components/idps/pages/login-success.tsx +++ b/apps/login/src/components/idps/pages/login-success.tsx @@ -6,6 +6,7 @@ export async function loginSuccess( idpIntent: { idpIntentId: string; idpIntentToken: string }, requestId?: string, onSuccessRedirectTo?: string, + idpId?: string, ) { return ( <> @@ -21,6 +22,7 @@ export async function loginSuccess( idpIntent={idpIntent} requestId={requestId} onSuccessRedirectTo={onSuccessRedirectTo} + idpId={idpId} /> ); diff --git a/apps/login/src/lib/server/idp.ts b/apps/login/src/lib/server/idp.ts index 9592ca9a2..f1dcb8da0 100644 --- a/apps/login/src/lib/server/idp.ts +++ b/apps/login/src/lib/server/idp.ts @@ -52,7 +52,6 @@ export async function redirectToIdp( // redirect to LDAP page where username and password is requested if (provider === "ldap") { - await setLastUsedIdpId(idpId); params.set("idpId", idpId); redirect(`/idp/ldap?` + params.toString()); } @@ -70,7 +69,6 @@ export async function redirectToIdp( } if (response && "redirect" in response && response?.redirect) { - await setLastUsedIdpId(idpId); redirect(response.redirect); } @@ -114,6 +112,7 @@ type CreateNewSessionCommand = { password?: string; organization?: string; requestId?: string; + idpId?: string; }; export async function createNewSessionFromIdpIntent( @@ -171,6 +170,9 @@ export async function createNewSessionFromIdpIntent( ); if (emailVerificationCheck?.redirect) { + if (command.idpId) { + await setLastUsedIdpId(command.idpId); + } return emailVerificationCheck; } @@ -197,6 +199,9 @@ export async function createNewSessionFromIdpIntent( command.requestId, ); if (mfaFactorCheck?.redirect) { + if (command.idpId) { + await setLastUsedIdpId(command.idpId); + } return mfaFactorCheck; } @@ -215,6 +220,9 @@ export async function createNewSessionFromIdpIntent( ); if (url) { + if (command.idpId) { + await setLastUsedIdpId(command.idpId); + } return { redirect: url }; } } diff --git a/apps/login/src/lib/server/register.ts b/apps/login/src/lib/server/register.ts index f84b4c8d5..1824a54ec 100644 --- a/apps/login/src/lib/server/register.ts +++ b/apps/login/src/lib/server/register.ts @@ -1,5 +1,6 @@ "use server"; +import { setLastUsedIdpId } from "@/lib/cookies"; import { createSessionAndUpdateCookie, createSessionForIdpAndUpdateCookie, @@ -229,5 +230,8 @@ export async function registerUserAndLinkToIDP( loginSettings?.defaultRedirectUri, ); + if (url) { + await setLastUsedIdpId(command.idpId); + } return { redirect: url }; }