diff --git a/packages/console/src/pages/SignInExperience/PageContent/Content/TermsForm.tsx b/packages/console/src/pages/SignInExperience/PageContent/Content/TermsForm.tsx
index 7f1a08c33c10..6d14a7c46ccf 100644
--- a/packages/console/src/pages/SignInExperience/PageContent/Content/TermsForm.tsx
+++ b/packages/console/src/pages/SignInExperience/PageContent/Content/TermsForm.tsx
@@ -1,19 +1,40 @@
-import { useFormContext } from 'react-hook-form';
+import { AgreeToTermsPolicy } from '@logto/schemas';
+import { Controller, useFormContext } from 'react-hook-form';
import { useTranslation } from 'react-i18next';
import Card from '@/ds-components/Card';
+import DynamicT from '@/ds-components/DynamicT';
import FormField from '@/ds-components/FormField';
+import Select from '@/ds-components/Select';
import TextInput from '@/ds-components/TextInput';
import { uriValidator } from '@/utils/validator';
import type { SignInExperienceForm } from '../../types';
import FormSectionTitle from '../components/FormSectionTitle';
+const agreeToTermsPolicyOptions = [
+ {
+ value: AgreeToTermsPolicy.AutoAgree,
+ title: ,
+ },
+ {
+ value: AgreeToTermsPolicy.RegistrationOnly,
+ title: ,
+ },
+ {
+ value: AgreeToTermsPolicy.RegistrationAndSignIn,
+ title: (
+
+ ),
+ },
+];
+
function TermsForm() {
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
const {
register,
formState: { errors },
+ control,
} = useFormContext();
return (
@@ -37,6 +58,16 @@ function TermsForm() {
placeholder={t('sign_in_exp.content.terms_of_use.privacy_policy_placeholder')}
/>
+
+ (
+
+ )}
+ />
+
);
}
diff --git a/packages/phrases/src/locales/de/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/de/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..a16bbaf7ee58 100644
--- a/packages/phrases/src/locales/de/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/de/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,13 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: 'Den Bedingungen zustimmen',
+ agree_policies: {
+ auto: 'Weiterhin automatisch den Bedingungen zustimmen',
+ registration: 'Checkbox-Zustimmung nur bei der Registrierung erforderlich',
+ registration_and_sign_in:
+ 'Checkbox-Zustimmung sowohl bei der Registrierung als auch beim Anmelden erforderlich',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/en/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/en/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..a7334b65d125 100644
--- a/packages/phrases/src/locales/en/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/en/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,12 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: 'Agree to terms',
+ agree_policies: {
+ auto: 'Continue to automatically agree to terms',
+ registration: 'Require checkbox agreement on registration only',
+ registration_and_sign_in: 'Require checkbox agreement on both registration and sign-in',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/es/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/es/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..879d0e910e7b 100644
--- a/packages/phrases/src/locales/es/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/es/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,13 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: 'Aceptar los términos',
+ agree_policies: {
+ auto: 'Continuar aceptando los términos automáticamente',
+ registration: 'Requerir acuerdo con la casilla de verificación solo en el registro',
+ registration_and_sign_in:
+ 'Requerir acuerdo con la casilla de verificación tanto en el registro como al iniciar sesión',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/fr/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/fr/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..07548a8e81e3 100644
--- a/packages/phrases/src/locales/fr/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/fr/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,13 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: 'Accepter les conditions',
+ agree_policies: {
+ auto: 'Continuer à accepter automatiquement les conditions',
+ registration: 'Requérir l’accord par case à cocher uniquement lors de l’inscription',
+ registration_and_sign_in:
+ 'Requérir l’accord par case à cocher à la fois lors de l’inscription et de la connexion',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/it/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/it/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..ebe409f3ff8d 100644
--- a/packages/phrases/src/locales/it/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/it/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,13 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: 'Accettare i termini',
+ agree_policies: {
+ auto: 'Continuare ad accettare automaticamente i termini',
+ registration: "Richiedere l'accordo della casella di controllo solo alla registrazione",
+ registration_and_sign_in:
+ "Richiedere l'accordo della casella di controllo sia alla registrazione che al login",
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/ja/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/ja/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..bec2af11d8f1 100644
--- a/packages/phrases/src/locales/ja/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/ja/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,12 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: '利用規約に同意する',
+ agree_policies: {
+ auto: '自動的に利用規約に同意し続ける',
+ registration: '登録時のみチェックボックスで同意を求める',
+ registration_and_sign_in: '登録時およびサインイン時の両方でチェックボックスの同意を求める',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/ko/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/ko/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..2f07e01a950c 100644
--- a/packages/phrases/src/locales/ko/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/ko/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,12 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: '약관에 동의하기',
+ agree_policies: {
+ auto: '자동으로 약관에 계속 동의하기',
+ registration: '등록 시에만 체크박스 동의 요구',
+ registration_and_sign_in: '등록 시와 로그인 시 모두 체크박스 동의 요구',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/pl-pl/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/pl-pl/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..5066dbfc1ab6 100644
--- a/packages/phrases/src/locales/pl-pl/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/pl-pl/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,12 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: 'Zgadzam się na warunki',
+ agree_policies: {
+ auto: 'Kontynuuj automatyczne zgadzanie się na warunki',
+ registration: 'Wymagaj zgody na warunki przy rejestracji',
+ registration_and_sign_in: 'Wymagaj zgody na warunki przy rejestracji i logowaniu',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/pt-br/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/pt-br/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..efff107b2855 100644
--- a/packages/phrases/src/locales/pt-br/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/pt-br/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,13 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: 'Concordar com os termos',
+ agree_policies: {
+ auto: 'Continuar concordando automaticamente com os termos',
+ registration: 'Requerer concordância da caixa de seleção apenas no registro',
+ registration_and_sign_in:
+ 'Requerer concordância da caixa de seleção tanto no registro quanto no login',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/pt-pt/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/pt-pt/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..db5d02ecb4e9 100644
--- a/packages/phrases/src/locales/pt-pt/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/pt-pt/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,13 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: 'Aceitar os termos',
+ agree_policies: {
+ auto: 'Continuar a aceitar automaticamente os termos',
+ registration: 'Exigir aceitação da caixa de verificação apenas no registo',
+ registration_and_sign_in:
+ 'Exigir aceitação da caixa de verificação tanto no registo quanto no login',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/ru/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/ru/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..8139adf2c2f5 100644
--- a/packages/phrases/src/locales/ru/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/ru/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,13 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: 'Согласиться с условиями',
+ agree_policies: {
+ auto: 'Продолжить автоматически соглашаться с условиями',
+ registration: 'Требовать согласия через галочку только при регистрации',
+ registration_and_sign_in:
+ 'Требовать согласия через галочку при регистрации и входе в систему',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/tr-tr/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/tr-tr/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..3b261fa4fbe8 100644
--- a/packages/phrases/src/locales/tr-tr/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/tr-tr/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,12 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: 'Şartları kabul et',
+ agree_policies: {
+ auto: 'Şartları otomatik olarak kabul etmeye devam et',
+ registration: 'Sadece kayıt sırasında onay kutusu ile onay gerektirir',
+ registration_and_sign_in: 'Kayıt ve giriş sırasında onay kutusu ile onay gerektirir',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/zh-cn/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/zh-cn/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..a1f2883e8f8b 100644
--- a/packages/phrases/src/locales/zh-cn/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/zh-cn/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,12 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: '同意条款',
+ agree_policies: {
+ auto: '继续自动同意条款',
+ registration: '仅在注册时需要勾选同意',
+ registration_and_sign_in: '在注册和登录时都需要勾选同意',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/zh-hk/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/zh-hk/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..d779feb742fe 100644
--- a/packages/phrases/src/locales/zh-hk/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/zh-hk/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,12 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: '同意條款',
+ agree_policies: {
+ auto: '繼續自動同意條款',
+ registration: '只在註冊時要求勾選同意',
+ registration_and_sign_in: '在註冊和登錄時都需要勾選同意',
+ },
},
languages: {
title: 'LANGUAGES',
diff --git a/packages/phrases/src/locales/zh-tw/translation/admin-console/sign-in-exp/content.ts b/packages/phrases/src/locales/zh-tw/translation/admin-console/sign-in-exp/content.ts
index 93c9fa5a55ad..18978b83d36c 100644
--- a/packages/phrases/src/locales/zh-tw/translation/admin-console/sign-in-exp/content.ts
+++ b/packages/phrases/src/locales/zh-tw/translation/admin-console/sign-in-exp/content.ts
@@ -5,6 +5,12 @@ const content = {
terms_of_use_placeholder: 'https://your.terms.of.use/',
privacy_policy: 'Privacy policy URL',
privacy_policy_placeholder: 'https://your.privacy.policy/',
+ agree_to_terms: '同意條款',
+ agree_policies: {
+ auto: '繼續自動同意條款',
+ registration: '僅在註冊時需要勾選同意',
+ registration_and_sign_in: '在註冊和登入時都需要勾選同意',
+ },
},
languages: {
title: 'LANGUAGES',