Add terms and conditions checkbox to sign-up methods (#45)

A checkbox has been added for user acceptance of terms and conditions during sign-up. This change includes adding a new adjustable flag in the configuration to control the display of the checkbox. A new file "terms-and-conditions-form-field.tsx" is added to handle the checkbox UI part. Also, localization support has been added for the feature.
This commit is contained in:
Giancarlo Buomprisco
2024-07-12 14:32:02 +08:00
committed by GitHub
parent 3393863dd2
commit a75f7c576d
8 changed files with 96 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ export function SignUpMethodsContainer(props: {
oAuth: Provider[];
};
displayTermsCheckbox?: boolean;
inviteToken?: string;
}) {
const redirectUrl = getCallbackUrl(props);
@@ -39,6 +40,7 @@ export function SignUpMethodsContainer(props: {
<EmailPasswordSignUpContainer
emailRedirectTo={redirectUrl}
defaultValues={defaultValues}
displayTermsCheckbox={props.displayTermsCheckbox}
/>
</If>
@@ -48,6 +50,7 @@ export function SignUpMethodsContainer(props: {
redirectUrl={redirectUrl}
shouldCreateUser={true}
defaultValues={defaultValues}
displayTermsCheckbox={props.displayTermsCheckbox}
/>
</If>