.github
.storybook
__mocks__
docs
architecture.md
contributor-guide.md
custom-authentication.md
customization.md
editorial-workflow.md
examples.md
extending.md
intro.md
quick-start.md
test-drive.md
validation.md
widgets.md
example
img
scripts
src
.all-contributorsrc
.babelrc
.editorconfig
.eslintrc
.gitignore
.nvmrc
.stylelintrc
.travis.yml
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
codecov.yml
netlify.toml
package.json
postcss.config.js
setupTests.js
wallaby.config.js
webpack.base.js
webpack.cli.js
webpack.dev.js
webpack.prod.js
yarn.lock
34 lines
2.1 KiB
Markdown
34 lines
2.1 KiB
Markdown
# Custom Authentication
|
|
|
|
Netlify CMS is meant to be platform agnostic, so we're always looking to expand the ecosystem and find new ways to use it. Below is a list of currently submitted OAuth providers - feel free to [submit a pull request](https://github.com/netlify/netlify-cms/blob/master/CONTRIBUTING.md) if you'd like to add yours!
|
|
|
|
## External OAuth Clients:
|
|
| Author | Supported Git hosts | Languages | Link |
|
|
|------------|---------------------------|-----------|---------------------------------------------------------------------|
|
|
| @vencax | GitHub, GitHub Enterprise | Node.js | [Repo](https://github.com/vencax/netlify-cms-github-oauth-provider) |
|
|
|
|
Check each project's readme for instructions on how to configure it.
|
|
|
|
## Configuration
|
|
CMS configuration properties that affect authentication, including some optional properties that aren't mentioned elsewhere in the docs, are explained below:
|
|
|
|
```yaml
|
|
backend:
|
|
|
|
# REQUIRED CONFIG
|
|
name: github
|
|
repo: user/repository
|
|
|
|
# OPTIONAL CONFIG
|
|
# Note: no trailing slashes on URLs
|
|
api_root: https://github.some.domain.com/api/v3
|
|
site_domain: static.site.url.com
|
|
base_url: https://auth.server.url.com
|
|
```
|
|
|
|
* **name:** name of the auth provider, varies by implementation. `github` when using GitHub auth, even with a third party auth client.
|
|
* **repo:** repo where content is to be stored.
|
|
* **api_root (optional):** the API endpoint. Defaults to `https://api.github.com` when used with the `github` provider. Only necessary in certain cases, e.g., when using with GitHub Enterprise.
|
|
* **site_domain (optional):** sets `site_id` query param sent to API endpoint. Defaults to `location.hostname`, minus any port, or `cms.netlify.com` on localhost so that auth "just works" during local development. Sites with custom authentication will often need to set this for local development to work properly.
|
|
* **base_url (optional):** OAuth client URL, defaults to `https://api.netlify.com` as a convenience. This is **required** when using an external OAuth server.
|