Skip to content

Commit a3b6cbd

Browse files
authored
Merge pull request semaphoreui#59 from markuman/add-gitea-auth
add gitea documentation as openid provider
2 parents 8de2cbe + effd721 commit a3b6cbd

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Gitea config
2+
3+
`config.json`:
4+
```json
5+
"oidc_providers": {
6+
"github": {
7+
"icon": "github",
8+
"display_name": "Sign in with gitea instance",
9+
"client_id": "123-456-789",
10+
"client_secret": "**********",
11+
"redirect_url": "https://your-semaphore.tld/api/auth/oidc/github/redirect",
12+
"endpoint": {
13+
"auth": "https://your-gitea.tld/login/oauth/authorize",
14+
"token": "https://your-gitea.tld/login/oauth/access_token",
15+
"userinfo": "https://your-gitea.tld/api/v1/user"
16+
},
17+
"scopes": ["read:user", "user:email"],
18+
"username_claim": "login",
19+
"email_claim": "email",
20+
"name_claim": "full_name",
21+
"order": 1
22+
}
23+
}
24+
```
25+
26+
In your `gitea` instance, go to `https://your-gitea.tld/user/settings/applications` and create a new `oauth2` application.
27+
As redirect URI use `https://your-semaphore.tld/api/auth/oidc/github/redirect`.
28+
29+
Authentication works fine. But "Name" and "Username" does not recieved correctly. The username will be a unique ID in semaphore and the name will be set to "Anonymous", which is changeable by the user itself. The emails is mapped correctly.

0 commit comments

Comments
 (0)