From 328f2591b79129ebd23710a35f8c4e73f8612873 Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Fri, 1 Nov 2024 13:54:24 +0200 Subject: [PATCH 1/9] Update references to include legaAccepted and legalAcceptedAt --- .../javascript/sign-up/authenticate-with.mdx | 35 +++++++++++++++++++ .../references/javascript/sign-up/sign-up.mdx | 7 ++++ docs/references/javascript/user/user.mdx | 7 ++++ 3 files changed, 49 insertions(+) diff --git a/docs/references/javascript/sign-up/authenticate-with.mdx b/docs/references/javascript/sign-up/authenticate-with.mdx index bab387c6b3..031a72b075 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 accepted the legal 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 accepted the legal 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 accepted the legal 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..b1693e6e47 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 accepted the legal documents. ### `update()` diff --git a/docs/references/javascript/user/user.mdx b/docs/references/javascript/user/user.mdx index d426a4c9cd..404d9d0f21 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 express consent is not enabled. + + --- + - `lastSignInAt` - `Date` From fe81c69c0bad06bab798cacc325bd1ecfbbfa847 Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Fri, 1 Nov 2024 13:59:26 +0200 Subject: [PATCH 2/9] Apply formatting --- docs/references/javascript/sign-up/sign-up.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/references/javascript/sign-up/sign-up.mdx b/docs/references/javascript/sign-up/sign-up.mdx index b1693e6e47..2d346e8dce 100644 --- a/docs/references/javascript/sign-up/sign-up.mdx +++ b/docs/references/javascript/sign-up/sign-up.mdx @@ -265,7 +265,7 @@ function create(params: SignUpCreateParams): Promise Transfer the user to a dedicated sign-up for an OAuth flow. - --- + --- - `legalAccepted` - `boolean` From 62eeb09bf42de4651ac8ab5b153ec94f96a68634 Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Mon, 4 Nov 2024 16:48:15 +0200 Subject: [PATCH 3/9] Add guide on how to enable legal consent --- docs/authentication/configuration/legal-consent.mdx | 10 ++++++++++ docs/manifest.json | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 docs/authentication/configuration/legal-consent.mdx diff --git a/docs/authentication/configuration/legal-consent.mdx b/docs/authentication/configuration/legal-consent.mdx new file mode 100644 index 0000000000..eceefb3774 --- /dev/null +++ b/docs/authentication/configuration/legal-consent.mdx @@ -0,0 +1,10 @@ +--- +title: Express consent to legal documents +description: Learn how to enable legal consent to your application by configuring Clerk's express consent to legal documents. +--- + +Clerk provides a way to add legal consent to your application by configuring express legal consent. This feature allows you to require users to agree to your terms of service or privacy policy before they can sign up to your application. + +## How to enable express express consent to legal documents + +To enable express legal consent, you need to create a legal consent document in the Clerk Dashboard. You will have to navigate to **Compliance > Legal** section in the dashboard, you can enable the express consent to legal documents and provide the URLs to your terms of service and privacy policy. Now if you navigate to the sign-up page, you will see a checkbox that requires users to agree to your terms of service and privacy policy before they can sign up! diff --git a/docs/manifest.json b/docs/manifest.json index 8bbb9087a2..93fa22682a 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -350,6 +350,10 @@ { "title": "Restrictions", "href": "/docs/authentication/configuration/restrictions" + }, + { + "title": "Legal consent", + "href": "/docs/authentication/configuration/legal-consent" } ] ] From f8f9a309d6c6ade8e91ef2cfbb81c204469d2208 Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:00:29 -0500 Subject: [PATCH 4/9] docs review --- .../authentication/configuration/legal-compliance.mdx | 11 +++++++++++ docs/authentication/configuration/legal-consent.mdx | 10 ---------- docs/manifest.json | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 docs/authentication/configuration/legal-compliance.mdx delete mode 100644 docs/authentication/configuration/legal-consent.mdx diff --git a/docs/authentication/configuration/legal-compliance.mdx b/docs/authentication/configuration/legal-compliance.mdx new file mode 100644 index 0000000000..f0c234def8 --- /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/authentication/configuration/legal-consent.mdx b/docs/authentication/configuration/legal-consent.mdx deleted file mode 100644 index eceefb3774..0000000000 --- a/docs/authentication/configuration/legal-consent.mdx +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: Express consent to legal documents -description: Learn how to enable legal consent to your application by configuring Clerk's express consent to legal documents. ---- - -Clerk provides a way to add legal consent to your application by configuring express legal consent. This feature allows you to require users to agree to your terms of service or privacy policy before they can sign up to your application. - -## How to enable express express consent to legal documents - -To enable express legal consent, you need to create a legal consent document in the Clerk Dashboard. You will have to navigate to **Compliance > Legal** section in the dashboard, you can enable the express consent to legal documents and provide the URLs to your terms of service and privacy policy. Now if you navigate to the sign-up page, you will see a checkbox that requires users to agree to your terms of service and privacy policy before they can sign up! diff --git a/docs/manifest.json b/docs/manifest.json index 93fa22682a..4ab96626aa 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -352,8 +352,8 @@ "href": "/docs/authentication/configuration/restrictions" }, { - "title": "Legal consent", - "href": "/docs/authentication/configuration/legal-consent" + "title": "Legal compliance", + "href": "/docs/authentication/configuration/legal-compliance" } ] ] From dda20155f97c61b311913668a934fccb024dcb2a Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:08:49 -0500 Subject: [PATCH 5/9] update property description --- .../javascript/sign-up/authenticate-with.mdx | 10 +++++----- docs/references/javascript/sign-up/sign-up.mdx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/references/javascript/sign-up/authenticate-with.mdx b/docs/references/javascript/sign-up/authenticate-with.mdx index 031a72b075..e35dde9ccf 100644 --- a/docs/references/javascript/sign-up/authenticate-with.mdx +++ b/docs/references/javascript/sign-up/authenticate-with.mdx @@ -64,7 +64,7 @@ function authenticateWithRedirect(params: AuthenticateWithRedirectParams): Promi - `legalAccepted?` - `boolean` - The user has accepted the legal documents. + The user has agreed to the terms of service and privacy policy. ## `authenticateWithWeb3()` @@ -102,7 +102,7 @@ function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise ### `GenerateSignatureParams` @@ -132,7 +132,7 @@ function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise ## `authenticateWithMetamask()` @@ -158,7 +158,7 @@ function authenticateWithMetamask( - `legalAccepted?` - `boolean` - The user has accepted the legal documents. + The user has agreed to the terms of service and privacy policy. ## `authenticateWithCoinbaseWallet()` @@ -184,7 +184,7 @@ function authenticateWithCoinbaseWallet( - `legalAccepted?` - `boolean` - The user has accepted the legal documents. + The user has agreed to the terms of service and privacy policy. [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 2d346e8dce..7d40a2e696 100644 --- a/docs/references/javascript/sign-up/sign-up.mdx +++ b/docs/references/javascript/sign-up/sign-up.mdx @@ -270,7 +270,7 @@ function create(params: SignUpCreateParams): Promise - `legalAccepted` - `boolean` - The user has accepted the legal documents. + The user has agreed to the terms of service and privacy policy. ### `update()` From c56a2ef9a7a2fb4740e6a573b682a93e06025985 Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:10:14 -0500 Subject: [PATCH 6/9] Update docs/references/javascript/user/user.mdx --- docs/references/javascript/user/user.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/references/javascript/user/user.mdx b/docs/references/javascript/user/user.mdx index 404d9d0f21..825c47be38 100644 --- a/docs/references/javascript/user/user.mdx +++ b/docs/references/javascript/user/user.mdx @@ -255,7 +255,7 @@ 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 express consent is not enabled. + Date when the user accepted the terms of service and privacy policy. May be empty if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. --- From 4e7be1258f71cf438ebcf4bfddf7d32fce6dc478 Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Thu, 7 Nov 2024 20:22:06 +0200 Subject: [PATCH 7/9] bring back legal documents reference --- .../javascript/sign-up/authenticate-with.mdx | 10 +++++----- docs/references/javascript/sign-up/sign-up.mdx | 2 +- docs/references/javascript/user/user.mdx | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/references/javascript/sign-up/authenticate-with.mdx b/docs/references/javascript/sign-up/authenticate-with.mdx index e35dde9ccf..463f4e4478 100644 --- a/docs/references/javascript/sign-up/authenticate-with.mdx +++ b/docs/references/javascript/sign-up/authenticate-with.mdx @@ -64,7 +64,7 @@ function authenticateWithRedirect(params: AuthenticateWithRedirectParams): Promi - `legalAccepted?` - `boolean` - The user has agreed to the terms of service and privacy policy. + The user has agreed to the legal documents. ## `authenticateWithWeb3()` @@ -102,7 +102,7 @@ function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise ### `GenerateSignatureParams` @@ -132,7 +132,7 @@ function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise ## `authenticateWithMetamask()` @@ -158,7 +158,7 @@ function authenticateWithMetamask( - `legalAccepted?` - `boolean` - The user has agreed to the terms of service and privacy policy. + The user has agreed to the legal documents. ## `authenticateWithCoinbaseWallet()` @@ -184,7 +184,7 @@ function authenticateWithCoinbaseWallet( - `legalAccepted?` - `boolean` - The user has agreed to the terms of service and privacy policy. + The user has agreed to the legal 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 7d40a2e696..0ee6dd9c87 100644 --- a/docs/references/javascript/sign-up/sign-up.mdx +++ b/docs/references/javascript/sign-up/sign-up.mdx @@ -270,7 +270,7 @@ function create(params: SignUpCreateParams): Promise - `legalAccepted` - `boolean` - The user has agreed to the terms of service and privacy policy. + The user has agreed to the legal documents. ### `update()` diff --git a/docs/references/javascript/user/user.mdx b/docs/references/javascript/user/user.mdx index 825c47be38..08fcdb58d9 100644 --- a/docs/references/javascript/user/user.mdx +++ b/docs/references/javascript/user/user.mdx @@ -255,7 +255,7 @@ The ClerkJS SDK provides some helper [methods](#methods) on the `User` object to - `legalAcceptedAt` - `Date` - Date when the user accepted the terms of service and privacy policy. May be empty if [**Require express consent to legal documents**](/docs/authentication/configuration/legal-compliance) is not enabled. + 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. --- From bafcaea833e98461124400791c9fa208702c3753 Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Thu, 7 Nov 2024 13:29:25 -0500 Subject: [PATCH 8/9] update property description --- .../javascript/sign-up/authenticate-with.mdx | 10 +++++----- docs/references/javascript/sign-up/sign-up.mdx | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/references/javascript/sign-up/authenticate-with.mdx b/docs/references/javascript/sign-up/authenticate-with.mdx index 463f4e4478..b645e0ca09 100644 --- a/docs/references/javascript/sign-up/authenticate-with.mdx +++ b/docs/references/javascript/sign-up/authenticate-with.mdx @@ -64,7 +64,7 @@ function authenticateWithRedirect(params: AuthenticateWithRedirectParams): Promi - `legalAccepted?` - `boolean` - The user has agreed to the legal documents. + The user has agreed to the [legal compliance](/docs/authentication/configuration/legal-compliance) documents. ## `authenticateWithWeb3()` @@ -102,7 +102,7 @@ function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise ### `GenerateSignatureParams` @@ -132,7 +132,7 @@ function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise ## `authenticateWithMetamask()` @@ -158,7 +158,7 @@ function authenticateWithMetamask( - `legalAccepted?` - `boolean` - The user has agreed to the legal documents. + The user has agreed to the [legal compliance](/docs/authentication/configuration/legal-compliance) documents. ## `authenticateWithCoinbaseWallet()` @@ -184,7 +184,7 @@ function authenticateWithCoinbaseWallet( - `legalAccepted?` - `boolean` - The user has agreed to the legal documents. + 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 0ee6dd9c87..c59bb5624d 100644 --- a/docs/references/javascript/sign-up/sign-up.mdx +++ b/docs/references/javascript/sign-up/sign-up.mdx @@ -270,7 +270,7 @@ function create(params: SignUpCreateParams): Promise - `legalAccepted` - `boolean` - The user has agreed to the legal documents. + The user has agreed to the [legal compliance](/docs/authentication/configuration/legal-compliance) documents. ### `update()` From 2edf3cf0598baa85c01d12b9d4455679a34c61bc Mon Sep 17 00:00:00 2001 From: Alexis Aguilar <98043211+alexisintech@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:00:53 -0500 Subject: [PATCH 9/9] Update docs/authentication/configuration/legal-compliance.mdx --- docs/authentication/configuration/legal-compliance.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/authentication/configuration/legal-compliance.mdx b/docs/authentication/configuration/legal-compliance.mdx index f0c234def8..78d544f5b0 100644 --- a/docs/authentication/configuration/legal-compliance.mdx +++ b/docs/authentication/configuration/legal-compliance.mdx @@ -7,5 +7,5 @@ Clerk provides a legal compliance setting that allows you to require users to ag To configure the setting: -1. In the Clerk Dashboard, navigate to the [Legal](https://dashboard.clerk.com/last-active?path=compliance/legal) page. +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**.