diff --git a/docs/2_auth.md b/docs/2_auth.md index 9793c08c..55fdc2b3 100644 --- a/docs/2_auth.md +++ b/docs/2_auth.md @@ -24,6 +24,7 @@ Valid providers are : - [Nextcloud](#nextcloud-provider) - [DigitalOcean](#digitalocean-auth-provider) - [Bitbucket](#bitbucket-auth-provider) +- [Gitea](#gitea-auth-provider) The provider can be selected using the `provider` configuration value. @@ -397,6 +398,25 @@ To use the provider, pass the following options: The default configuration allows everyone with Bitbucket account to authenticate. To restrict the access to the team members use additional configuration option: `--bitbucket-team=`. To restrict the access to only these users who has access to one selected repository use `--bitbucket-repository=`. +### Gitea Auth Provider + +1. Create a new application: `https://< your gitea host >/user/settings/applications` +2. Under `Redirect URI` enter the correct URL i.e. `https:///oauth2/callback` +3. Note the Client ID and Client Secret. +4. Pass the following options to the proxy: + +``` + --provider="github" + --redirect-url="https:///oauth2/callback" + --provider-display-name="Gitea" + --client-id="< client_id as generated by Gitea >" + --client-secret="< client_secret as generated by Gitea >" + --login-url="https://< your gitea host >/login/oauth/authorize" + --redeem-url="https://< your gitea host >/login/oauth/access_token" + --validate-url="https://< your gitea host >/api/v1" +``` + + ## Email Authentication To authorize by email domain use `--email-domain=yourcompany.com`. To authorize individual email addresses use `--authenticated-emails-file=/path/to/file` with one email per line. To authorize all email addresses use `--email-domain=*`.