Skip to content

Commit 26bb2d6

Browse files
committed
Document plugin
1 parent 82f1f85 commit 26bb2d6

File tree

1 file changed

+39
-2
lines changed

1 file changed

+39
-2
lines changed

README.md

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,42 @@
11
Netlify 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.

0 commit comments

Comments
 (0)