File tree Expand file tree Collapse file tree 1 file changed +39
-2
lines changed
Expand file tree Collapse file tree 1 file changed +39
-2
lines changed Original file line number Diff line number Diff line change 11Netlify Build plugin identity-sso - Protect a site with SSO via identity.
22
3- # Install
3+ ## Install
44
5- Please install this plugin from the Netlify app.
5+ The recommended way to install this right now is using a git npm dependency:
6+
7+ ` package.json `
8+
9+ ``` json
10+ {
11+ // ...
12+ "dependencies" : {
13+ "netlify-plugin-identity-sso" : " mraerino/build-plugin-identity-sso#semver:^0.1"
14+ }
15+ }
16+ ```
17+
18+ ` netlify.toml `
19+
20+ ``` toml
21+ [[plugins ]]
22+ package = " netlify-plugin-identity-sso"
23+ ```
24+
25+ ### Identity Setup
26+
27+ - Go to ` Settings -> Identity ` on your site and click ` Enable Identity `
28+ - Add a third-party auth provider, e.g. Google
29+ - Setup the identity webhook:
30+
31+ - URL: ` https://<site-name>.netlify.app/.netlify/functions/sso-auth `
32+ - Secret: _ Generate a long random string_
33+ - Events: _ Tick all boxes_
34+
35+ - Set the webhook secret as a build environment variable ` WEBHOOK_SECRET ` for
36+ use in the function
37+
38+ ## Gotchas
39+
40+ - ** Do not use a cached directory for publishing.** For some reason this breaks
41+ writing of a custom ` netlify.toml ` as part of the build.
42+ - This is hardcoded to allow any user with a ` @netlify.com ` email address.
You can’t perform that action at this time.
0 commit comments