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 }}
This repository was archived by the owner on Sep 9, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: packages/docs/content/docs/backends-overview.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Individual backends provide their own configuration documentation, but there are
17
17
| branch | string |`main`|_Optional_. The branch where published content is stored. All CMS commits and PRs are made to this branch |
18
18
| api_root | string | GitHub<br />`https://api.github.com`<br /><br />GitLab<br/>`https://gitlab.com/api/v4`<br /><br />Bitbucket<br />`https://api.bitbucket.org/2.0`<br /><br />Gitea<br />`https://try.gitea.io/api/v1`|_Optional_. The API endpoint. Only necessary in certain cases, like with GitHub Enterprise or self-hosted GitLab |
19
19
| site_domain | string |`location.hostname`<br /><br />On `localhost`<br />`cms.netlify.com`|_Optional_. Sets the `site_id` query param sent to the API endpoint. Non-Netlify auth setups will often need to set this for local development to work properly |
20
-
| base_url | string | GitHub or Bitbucket<br />`https://api.netlify.com`<br /><br />GitLab<br />`https://gitlab.com`|_Optional_. OAuth client hostname (just the base domain, no path). **Required** when using an external OAuth server or self-hosted GitLab/Gitea |
20
+
| base_url | string | GitHub or Bitbucket<br />`https://api.netlify.com`<br /><br />GitLab<br />`https://gitlab.com`<br /><br />Gitea<br />`https://try.gitea.io`|_Optional_. OAuth client hostname (just the base domain, no path). **Required** when using an external OAuth server or self-hosted GitLab/Gitea |
21
21
| auth_endpoint | string | GitHub or Bitbucket<br />`auth`<br /><br />GitLab<br />`oauth/authorize`|_Optional_. Path to append to `base_url` for authentication requests. |
Copy file name to clipboardExpand all lines: packages/docs/content/docs/gitea-backend.mdx
+10-10Lines changed: 10 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -9,24 +9,23 @@ beta: true
9
9
10
10
For repositories stored on Gitea, the `gitea` backend allows CMS users to log in directly with their Gitea account. Note that all users must have push access to your content repository for this to work.
11
11
12
-
<Alertseverity="warning">Because of the [lack](https://github.com/go-gitea/gitea/issues/14619) of a Gitea API endpoint for multifile commits, when using this backend, separate commits are created for every changed file. Please make sure this is handled correctly by your CI.</Alert>
12
+
Please note that only Gitea **1.20** and upwards is supported due to API limitations in previous versions.
13
13
14
14
## Authentication
15
15
16
-
Because Gitea requires a server for authentication and Netlify doesn't support Gitea, a custom OAuth provider needs to be used for basic Gitea authentication.
16
+
With Gitea's PKCE authorization, users can authenticate with Gitea directly from the client. To do this:
17
17
18
-
To enable basic Gitea authentication:
19
-
20
-
1. Setup an own OAuth provider, for example with [Teabag](https://github.com/denyskon/teabag).
21
-
2. Add the following lines to your Static CMS `config` file:
18
+
1. Add your Static CMS instance as an OAuth application in your user/organization settings or through the admin panel of your Gitea instance. Please make sure to uncheck the **Confidential Client** checkbox. For the **Redirect URIs**, enter the addresses where you access Static CMS, for example, `https://www.mysite.com/admin/`.
19
+
2. Gitea provides you with a **Client ID**. Copy it and insert it into your `config` file along with the other options:
22
20
23
21
<CodeTabs>
24
22
```yaml
25
23
backend:
26
24
name: gitea
27
25
repo: owner-name/repo-name # Path to your Gitea repository
28
-
base_url: https://oauth.example.com # URL of your OAuth provider
29
-
api_root: https://gitea.example.com/api/v1 # API url of your Gitea instance
26
+
app_id: your-client-id # The Client ID provided by Gitea
27
+
api_root: https://gitea.example.com/api/v1 # API URL of your Gitea instance
28
+
base_url: https://gitea.example.com # Root URL of your Gitea instance
30
29
# optional, defaults to main
31
30
# branch: main
32
31
```
@@ -35,8 +34,9 @@ backend:
35
34
backend: {
36
35
name:'gitea',
37
36
repo:'owner-name/repo-name', // Path to your Gitea repository
38
-
base_url:'https://oauth.example.com', // URL of your OAuth provider
39
-
api_root:'https://gitea.example.com/api/v1'// API url of your Gitea instance
37
+
app_id:'your-client-id', // The Client ID provided by Gitea
38
+
api_root:'https://gitea.example.com/api/v1', // API URL of your Gitea instance
39
+
base_url:'https://gitea.example.com', // Root URL of your Gitea instance
0 commit comments