Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Legal consent #1671

Merged
merged 10 commits into from
Nov 11, 2024
11 changes: 11 additions & 0 deletions docs/authentication/configuration/legal-compliance.mdx
Original file line number Diff line number Diff line change
@@ -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 [`<SignUp />` 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.
alexisintech marked this conversation as resolved.
Show resolved Hide resolved
1. Enable or disable **Require express consent to legal documents**.
4 changes: 4 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@
{
"title": "Restrictions",
"href": "/docs/authentication/configuration/restrictions"
},
{
"title": "Legal compliance",
"href": "/docs/authentication/configuration/legal-compliance"
}
]
]
Expand Down
35 changes: 35 additions & 0 deletions docs/references/javascript/sign-up/authenticate-with.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 terms of service and privacy policy.
</Properties>

## `authenticateWithWeb3()`
Expand Down Expand Up @@ -89,6 +96,13 @@ function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise<SignU
- `Web3Strategy`

The Web3 verification strategy.

---

- `legalAccepted?`
- `boolean`

The user has agreed to the terms of service and privacy policy.
</Properties>

### `GenerateSignatureParams`
Expand All @@ -112,6 +126,13 @@ function authenticateWithWeb3(params: AuthenticateWithWeb3Params): Promise<SignU
- `Web3Provider`

The Web3 provider to generate the signature with.

---

- `legalAccepted?`
- `boolean`

The user has agreed to the terms of service and privacy policy.
</Properties>

## `authenticateWithMetamask()`
Expand All @@ -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 terms of service and privacy policy.
</Properties>

## `authenticateWithCoinbaseWallet()`
Expand All @@ -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 terms of service and privacy policy.
</Properties>

[signup-ref]: /docs/references/javascript/sign-up/sign-up
7 changes: 7 additions & 0 deletions docs/references/javascript/sign-up/sign-up.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,13 @@ function create(params: SignUpCreateParams): Promise<SignUpResource>
- `boolean`

Transfer the user to a dedicated sign-up for an OAuth flow.

---

- `legalAccepted`
- `boolean`

The user has agreed to the terms of service and privacy policy.
</Properties>

### `update()`
Expand Down
7 changes: 7 additions & 0 deletions docs/references/javascript/user/user.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
alexisintech marked this conversation as resolved.
Show resolved Hide resolved

---

- `lastSignInAt`
- `Date`

Expand Down
Loading