You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/turnstile/additional-configuration/hostname-management.mdx
+11-6Lines changed: 11 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ sidebar:
6
6
7
7
---
8
8
9
+
import { DashButton, Steps } from"~/components"
10
+
9
11
You can associate hostnames with your widget to control where it can be used using Hostname Management. Managing your hostnames ensures that Turnstile works seamlessly with your setup, whether you add standalone hostnames or leverage zones registered to your Cloudflare account.
10
12
11
13
## Hostname limits
@@ -22,12 +24,15 @@ You can add a hostname to your Turnstile widget even if it is not on the Cloudfl
22
24
23
25
To add a custom hostname:
24
26
25
-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
26
-
2. Go to **Turnstile**.
27
-
3. On an existing widget, select **Settings**.
28
-
4. Select **Add Hostnames** under Hostname Management.
29
-
5. Add a custom hostname or choose from an existing hostname.
30
-
6. Select **Add**.
27
+
<Steps>
28
+
1. In the Cloudflare dashboard, go to the **Turnstile** page.
29
+
30
+
<DashButtonurl="/?to=/:account/turnstile" />
31
+
2. On an existing widget, select **Settings**.
32
+
3. Select **Add Hostnames** under Hostname Management.
33
+
4. Add a custom hostname or choose from an existing hostname.
Copy file name to clipboardExpand all lines: src/content/docs/turnstile/extensions/google-firebase.mdx
+70-58Lines changed: 70 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,88 +7,100 @@ sidebar:
7
7
8
8
---
9
9
10
+
import { Steps, DashButton } from"~/components"
11
+
10
12
Turnstile is [available as an extension](https://extensions.dev/extensions/cloudflare/cloudflare-turnstile-app-check-provider) with [Google's Firebase](https://firebase.google.com/) platform as an [App Check](https://firebase.google.com/docs/app-check) provider. You can leverage Cloudflare Turnstile's bot detection and challenge capabilities to ensure that requests to your Firebase backend services are verified and only authentic human visitors can interact with your application.
11
13
12
14
Google Firebase is a comprehensive app development platform that provides a variety of tools and services to help developers build, improve, and grow their mobile and web applications.
13
15
14
16
Firebase App Check helps protect Firebase resources like Cloud Firestore, Realtime Database, Cloud Storage, and Functions from abuse, such as automated fraud attacks and denial of service (DoS) attacks, by ensuring that incoming requests are from legitimate visitors and trusted sources.
15
17
16
-
## Set up a Google Firebase project
18
+
## 1. Set up a Google Firebase project
17
19
18
-
1. Create a Firebase project by going to the [Firebase Console](https://console.firebase.google.com/).
19
-
2. Select **Add Project** and follow the prompts to create a new project.
20
-
3. Add an app to your project by selecting your project.
21
-
4. In the project overview, select **Add App** and choose the platform: **Web**.
22
-
5.[Register your app](https://firebase.google.com/docs/web/setup?hl=en&authuser=0#register-app) and follow the guide to get your Firebase configuration.
20
+
<Steps>
21
+
1. Create a Firebase project by going to the [Firebase Console](https://console.firebase.google.com/).
22
+
2. Select **Add Project** and follow the prompts to create a new project.
23
+
3. Add an app to your project by selecting your project.
24
+
4. In the project overview, select **Add App** and choose the platform: **Web**.
25
+
5.[Register your app](https://firebase.google.com/docs/web/setup?hl=en&authuser=0#register-app) and follow the guide to get your Firebase configuration.
26
+
</Steps>
23
27
24
28
:::note
25
29
26
30
It is important to register your web app first to connect it with Turnstile later.
27
31
:::
28
32
29
-
## Set up Cloudflare Turnstile
33
+
## 2. Set up Cloudflare Turnstile
30
34
31
-
1. Create a Cloudflare Turnstile site by going to the [Cloudflare Turnstile dashboard](https://dash.cloudflare.com/?to=/:account/turnstile).
32
-
2. Create a new widget and get the [sitekey and secret key](/turnstile/get-started/#get-a-sitekey-and-secret-key).
33
-
- The domain you configure with the Turnstile widget should be the domain of your web app.
34
-
- The [widget mode](/turnstile/concepts/widget/) must be **Invisible**.
35
+
<Steps>
36
+
1. Create a Cloudflare Turnstile site by going to the [Cloudflare Turnstile dashboard](https://dash.cloudflare.com/?to=/:account/turnstile).
37
+
2. Create a new widget and get the [sitekey and secret key](/turnstile/get-started/#get-a-sitekey-and-secret-key).
38
+
- The domain you configure with the Turnstile widget should be the domain of your web app.
39
+
- The [widget mode](/turnstile/concepts/widget/) must be **Invisible**.
40
+
</Steps>
35
41
36
-
## Integrate Firebase App Check with Turnstile
42
+
## 3. Integrate Firebase App Check with Turnstile
37
43
38
-
### Enable App Check in Firebase
44
+
### 3a. Enable App Check in Firebase
39
45
40
-
1. Go to [Cloudflare Turnstile in the Firebase Extensions hub](https://extensions.dev/extensions/cloudflare/cloudflare-turnstile-app-check-provider).
41
-
2. Install the Cloudflare Turnstile extension to your Firebase project.
42
-
3. Enable [Cloud Functions](https://cloud.google.com/functions?hl=en), [Artifact Registry](https://cloud.google.com/artifact-registry), and [Secret Manager](https://cloud.google.com/security/products/secret-manager?hl=en).
43
-
4. Enter the secret key from Cloudflare Turnstile and your Firebase App ID.
44
-
5. Select **Install extension**.
46
+
<Steps>
47
+
1. Go to [Cloudflare Turnstile in the Firebase Extensions hub](https://extensions.dev/extensions/cloudflare/cloudflare-turnstile-app-check-provider).
48
+
2. Install the Cloudflare Turnstile extension to your Firebase project.
49
+
3. Enable [Cloud Functions](https://cloud.google.com/functions?hl=en), [Artifact Registry](https://cloud.google.com/artifact-registry), and [Secret Manager](https://cloud.google.com/security/products/secret-manager?hl=en).
50
+
4. Enter the secret key from Cloudflare Turnstile and your Firebase App ID.
51
+
5. Select **Install extension**.
52
+
</Steps>
45
53
46
-
### Grant access to the Cloudflare extension
54
+
### 3b. Grant access to the Cloudflare extension
47
55
48
-
1. Grant access to the Cloudflare extension under the IAM section of your project by selecting **Grant Access** under **View by Principals**.
49
-
2. Select `ext-cloudflare-turnstile` from the dropdown menu.
50
-
3. When filtering the token, select **Service Account Token Creator**.
56
+
<Steps>
57
+
1. Grant access to the Cloudflare extension under the IAM section of your project by selecting **Grant Access** under **View by Principals**.
58
+
2. Select `ext-cloudflare-turnstile` from the dropdown menu.
59
+
3. When filtering the token, select **Service Account Token Creator**.
60
+
</Steps>
51
61
52
-
### Configure Firebase in your app with Turnstile
62
+
### 3c. Configure Firebase in your app with Turnstile
### Verify the App Check token in your web application
103
+
### 3d. Verify the App Check token in your web application
92
104
93
105
To verify the App Check token in your web application, refer to Firebase's [Token Verification guide](https://firebase.google.com/docs/app-check/custom-resource-backend?hl=en#verification).
0 commit comments