diff --git a/docs/authentication/configuration/legal-compliance.mdx b/docs/authentication/configuration/legal-compliance.mdx new file mode 100644 index 0000000000..78d544f5b0 --- /dev/null +++ b/docs/authentication/configuration/legal-compliance.mdx @@ -0,0 +1,11 @@ +--- +title: Legal compliance +description: Learn how to configure your legal compliance settings in the Clerk Dashboard. +--- + +Clerk provides a legal compliance setting that allows you to require users to agree to your terms of service or privacy policy before they can sign up to your application. After enabling the setting, there will be a checkbox to accept the terms in your [`` component](/docs/components/authentication/sign-up) or [Account Portal sign-up page](/docs/customization/account-portal/overview#sign-up). + +To configure the setting: + +1. In the Clerk Dashboard, navigate to the [**Legal**](https://dashboard.clerk.com/last-active?path=compliance/legal) page. +1. Enable or disable **Require express consent to legal documents**. diff --git a/docs/manifest.json b/docs/manifest.json index 8bbb9087a2..4ab96626aa 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -350,6 +350,10 @@ { "title": "Restrictions", "href": "/docs/authentication/configuration/restrictions" + }, + { + "title": "Legal compliance", + "href": "/docs/authentication/configuration/legal-compliance" } ] ] diff --git a/docs/references/javascript/sign-up/authenticate-with.mdx b/docs/references/javascript/sign-up/authenticate-with.mdx index bab387c6b3..b645e0ca09 100644 --- a/docs/references/javascript/sign-up/authenticate-with.mdx +++ b/docs/references/javascript/sign-up/authenticate-with.mdx @@ -58,6 +58,13 @@ function authenticateWithRedirect(params: AuthenticateWithRedirectParams): Promi - `string | undefined` Email address to use for targeting a SAML connection at sign-up. + + --- + + - `legalAccepted?` + - `boolean` + + The user has agreed to the [legal compliance](/docs/authentication/configuration/legal-compliance) documents. ## `authenticateWithWeb3()` @@ -89,6 +96,13 @@ function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise ### `GenerateSignatureParams` @@ -112,6 +126,13 @@ function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise ## `authenticateWithMetamask()` @@ -131,6 +152,13 @@ function authenticateWithMetamask( - `{[string]: any}` Custom fields that will be attached to the [`User`](/docs/references/javascript/user/user) object post-signup. + + --- + + - `legalAccepted?` + - `boolean` + + The user has agreed to the [legal compliance](/docs/authentication/configuration/legal-compliance) documents. ## `authenticateWithCoinbaseWallet()` @@ -150,6 +178,13 @@ function authenticateWithCoinbaseWallet( - `{[string]: any}` Custom fields that will be attached to the [`User`](/docs/references/javascript/user/user) object post-signup. + + --- + + - `legalAccepted?` + - `boolean` + + The user has agreed to the [legal compliance](/docs/authentication/configuration/legal-compliance) documents. [signup-ref]: /docs/references/javascript/sign-up/sign-up diff --git a/docs/references/javascript/sign-up/sign-up.mdx b/docs/references/javascript/sign-up/sign-up.mdx index f69e16b59b..c59bb5624d 100644 --- a/docs/references/javascript/sign-up/sign-up.mdx +++ b/docs/references/javascript/sign-up/sign-up.mdx @@ -264,6 +264,13 @@ function create(params: SignUpCreateParams): Promise - `boolean` Transfer the user to a dedicated sign-up for an OAuth flow. + + --- + + - `legalAccepted` + - `boolean` + + The user has agreed to the [legal compliance](/docs/authentication/configuration/legal-compliance) documents. ### `update()` diff --git a/docs/references/javascript/user/user.mdx b/docs/references/javascript/user/user.mdx index d426a4c9cd..08fcdb58d9 100644 --- a/docs/references/javascript/user/user.mdx +++ b/docs/references/javascript/user/user.mdx @@ -252,6 +252,13 @@ The ClerkJS SDK provides some helper [methods](#methods) on the `User` object to --- + - `legalAcceptedAt` + - `Date` + + Date when the user accepted the legal documents. May be empty if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. + + --- + - `lastSignInAt` - `Date`