Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

netlify/netlify-plugin-identity-sso

Open more actions menu

Netlify Build plugin identity-sso - Protect a site with SSO via identity.

Install

The recommended way to install this right now is using a git npm dependency:

package.json

{
  // ...
  "dependencies": {
    "netlify-plugin-identity-sso": "netlify/netlify-plugin-identity-sso#v0.1.0"
  }
}

netlify.toml

[[plugins]]
package = "netlify-plugin-identity-sso"

Identity Setup

  • Go to Settings -> Identity on your site and click Enable Identity

  • Add a third-party auth provider, e.g. Google

  • Setup the identity webhook:

    • URL: https://<site-name>.netlify.app/.netlify/functions/sso-auth
    • Secret: Generate a long random string
    • Events: Tick all boxes
  • Set the webhook secret as a build environment variable WEBHOOK_SECRET for use in the function

Gotchas

  • Do not use a cached directory for publishing. For some reason this breaks writing of a custom netlify.toml as part of the build.
  • This is hardcoded to allow any user with a @netlify.com email address.

About

UNOFFICIAL - allows easily adding SSO access control to a Netlify site

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.