git.iko.soy/typeable/oauth2-proxy
on master help sign in
Add Gitea to auth config docs (#510)

* add gitea to auth config docs * PR feedback Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>

commit36da6e2be906e7d212178e633168dab99aee7eb4 authorOliver <oliver006@users.noreply.github.com> dateMon 4 May 2020, 16:59 (6 years ago) parentf7c050e
1 file changed+20
docs/2_auth.md+20
docs/2_auth.md+20
@@ -24,6 +24,7 @@ Valid providers are :
2424- [Nextcloud](#nextcloud-provider)
2525- [DigitalOcean](#digitalocean-auth-provider)
2626- [Bitbucket](#bitbucket-auth-provider)
27+- [Gitea](#gitea-auth-provider)
2728
2829The provider can be selected using the `provider` configuration value.
2930
@@ -397,6 +398,25 @@ To use the provider, pass the following options:
397398The default configuration allows everyone with Bitbucket account to authenticate. To restrict the access to the team members use additional configuration option: `--bitbucket-team=<Team name>`. To restrict the access to only these users who has access to one selected repository use `--bitbucket-repository=<Repository name>`.
398399
399400
401+### Gitea Auth Provider
402+
403+1. Create a new application: `https://< your gitea host >/user/settings/applications`
404+2. Under `Redirect URI` enter the correct URL i.e. `https://<proxied host>/oauth2/callback`
405+3. Note the Client ID and Client Secret.
406+4. Pass the following options to the proxy:
407+
408+```
409+ --provider="github"
410+ --redirect-url="https://<proxied host>/oauth2/callback"
411+ --provider-display-name="Gitea"
412+ --client-id="< client_id as generated by Gitea >"
413+ --client-secret="< client_secret as generated by Gitea >"
414+ --login-url="https://< your gitea host >/login/oauth/authorize"
415+ --redeem-url="https://< your gitea host >/login/oauth/access_token"
416+ --validate-url="https://< your gitea host >/api/v1"
417+```
418+
419+
400420## Email Authentication
401421
402422To 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=*`.