From 856676081ef7a265b69cfc0e4117e53e7b7b96a8 Mon Sep 17 00:00:00 2001 From: Oliver Hanikel Date: Sun, 21 Aug 2022 17:04:13 +0200 Subject: [PATCH] add sample oauth settings for gitea --- manual/deploy/oauth.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/manual/deploy/oauth.md b/manual/deploy/oauth.md index 67fd102d1..82ed72b16 100644 --- a/manual/deploy/oauth.md +++ b/manual/deploy/oauth.md @@ -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"), +} +```