Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sample oauth settings for gitea #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions manual/deploy/oauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,23 @@ OAUTH_ATTRIBUTE_MAP = {
```

Please see [this tutorial](https://forum.seafile.com/t/oauth-authentification-against-microsoft-office365-azure-cloud/7999) for the complete deployment process of OAuth against Azure Cloud.

###### Sample settings for Gitea:

```
ENABLE_OAUTH = True
OAUTH_CLIENT_ID = "your-client-id"
OAUTH_CLIENT_SECRET = "your-client-secret"
OAUTH_REDIRECT_URL = 'https://your-seafile/oauth/callback/'

OAUTH_PROVIDER_DOMAIN = 'your-domain'
OAUTH_AUTHORIZATION_URL = 'https://your-gitea/login/oauth/authorize'
OAUTH_TOKEN_URL = 'https://your-gitea/login/oauth/access_token'
OAUTH_USER_INFO_URL = 'https://your-gitea/api/v1/user'
# Gitea does not support scopes. You still have to define it or else Seahub complains.
OAUTH_SCOPE = [""]
OAUTH_ATTRIBUTE_MAP = {
"email": (True, "email"),
"login": (False, "name"),
}
```