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
{{ message }}
Repository navigation
Commit 0b03cd4
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: src/content/docs/guides/netlify-integration/installing-the-netlify-extension.mdx
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,13 @@ You need to be an owner or admin of the Endform organization you connect, and yo
43
43
});
44
44
```
45
45
46
-
5.### Show results on pull requests (optional)
46
+
5.### Make your Deploy Previews reachable
47
+
48
+
Endform's runners open your Deploy Previews like any visitor, so they can't sign in to Netlify.
49
+
New Netlify projects are private by default, so check **Project configuration > General > Visitor access > Project visibility** and set previews to public, or to password protected on Pro plans.
50
+
See [Private and password-protected Deploy Previews](/docs/guides/netlify-integration/password-protected-deploy-previews).
51
+
52
+
6.### Show results on pull requests (optional)
47
53
48
54
[Install the Endform GitHub app](https://endform.dev/app/docs-link?link=settings-integrations) on the repository to get an **Endform** check on each pull request.
49
55
@@ -52,7 +58,7 @@ You need to be an owner or admin of the Endform organization you connect, and yo
52
58
## How it works
53
59
54
60
Configuring a project creates an Endform API key for it.
55
-
Netlify stores the key as a secret environment variable, `ENDFORM_NETLIFY_API_KEY`, that's only available to Deploy Preview builds.
61
+
The extension keeps the key in its own settings for the project, not in your project's environment variables, and only uses it in Deploy Preview builds.
If your Netlify project protects its Deploy Previews, every request from your tests gets Netlify's protection page instead of your app.
11
-
Endform doesn't bypass the protection for you, but your tests can get past it themselves.
10
+
If your Netlify project protects its Deploy Previews, every request from your tests gets Netlify's login or password page instead of your app.
11
+
In the deploy log, this usually shows as failing tests and `401 Unauthorized` responses.
12
12
13
-
## Basic password protection
13
+
Check your project's protection under **Project configuration > General > Visitor access > Project visibility**.
14
+
Previews can be public, private, or password protected, separately from production.
15
+
16
+
## Private Deploy Previews
17
+
18
+
Netlify makes new projects private by default.
19
+
A private project asks every visitor to sign in with Netlify, and Netlify has no way for automated tests to get past it.
20
+
21
+
To test private Deploy Previews, change the preview visibility:
22
+
23
+
-**On any plan:** make previews public.
24
+
-**On Pro plans:** protect previews with a password instead, and let your tests enter it as described below.
25
+
26
+
Production can stay private either way.
27
+
28
+
## Password-protected Deploy Previews
29
+
30
+
Password protection is only available on Netlify Pro plans.
14
31
15
32
Netlify's password page is a form that posts a `password` field.
16
33
When the password is right, Netlify sets a cookie that gives access to the whole deploy.
@@ -24,7 +41,7 @@ Your tests can post the password once and add that cookie to every browser conte
24
41
25
42
Variables that start with `E2E_` are [sent to Endform's remote runners](/docs/explanation/transfer-state-to-remote-runners#environment-variables) automatically.
26
43
27
-
Also add `E2E_NETLIFY_PREVIEW_PASSWORD` to the project's `SECRETS_SCAN_OMIT_KEYS` variable, next to `ENDFORM_NETLIFY_API_KEY`.
44
+
Also add `E2E_NETLIFY_PREVIEW_PASSWORD` to the project's `SECRETS_SCAN_OMIT_KEYS` variable.
28
45
Build tools like Next.js cache the build environment, so Netlify's secrets scan would otherwise find the password in the build output and fail the build.
29
46
30
47
2.### Get the cookie
@@ -118,10 +135,3 @@ The [demo repository](https://github.com/endformdev/playwright-tutorial) uses th
118
135
<Asidetitle="Using a coding agent?">
119
136
Ask it to: "Make our Playwright tests work against password-protected Netlify Deploy Previews. Post `E2E_NETLIFY_PREVIEW_PASSWORD` to the base URL once, take the cookie from the `Set-Cookie` header, add it to every browser context through a `context` fixture override, and send it as a `Cookie` header on direct `fetch` calls. Do nothing when the variable isn't set."
120
137
</Aside>
121
-
122
-
## Netlify team login and SSO
123
-
124
-
Team login protection asks visitors to sign in with a Netlify account, so automated tests can't get past it.
125
-
Netlify doesn't document a way for automated requests to get past it.
126
-
127
-
To test protected Deploy Previews, switch the protection to a basic password, or turn off protection for Deploy Previews in your project's visitor access settings.
0 commit comments