Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
thomiceli committed Apr 17, 2023
1 parent 884195a commit 116daf4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A self-hosted pastebin **powered by Git**. [Try it here](https://opengist.thomic
* [Administration](#administration)
* [Use Nginx as a reverse proxy](#use-nginx-as-a-reverse-proxy)
* [Use Fail2ban](#use-fail2ban)
* [Configure OAuth](#configure-oauth)
* [License](#license)

## Features
Expand Down Expand Up @@ -170,6 +171,37 @@ Then run
```shell
service fail2ban restart
```

## Configure OAuth

Opengist can be configured to use OAuth to authenticate users, with GitHub or Gitea.

<details>
<summary>Integrate Github</summary>

* Add a new OAuth app in your [Github account settings](https://github.com/settings/applications/new)
* Set 'Authorization callback URL' to `http:https://opengist.domain/oauth/github/callback`
* Copy the 'Client ID' and 'Client Secret' and add them to the `config.yml` file :
```yaml
github.client-key: <key>
github.secret: <secret>
```
</details>

<details>
<summary>Integrate Gitea</summary>

* Add a new OAuth app in Application settings the your [Gitea instance](https://gitea.com/user/settings/applications)
* Set 'Redirect URI' to `http:https://opengist.domain/oauth/gitea/callback`
* Copy the 'Client ID' and 'Client Secret' and add them to the `config.yml` file :
```yaml
gitea.client-key: <key>
gitea.secret: <secret>
# URL of the Gitea instance. Default: https://gitea.com/
gitea.url: http:https://localhost:3000
```
</details>

## License

Opengist is licensed under the [AGPL-3.0 license](LICENSE).
4 changes: 2 additions & 2 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ github.client-key:
github.secret:

# To create a new OAuth2 application using Gitea : https://gitea.domain/user/settings/applications
gitea.client-key:
gitea.client-key:
gitea.secret:
# URL of your Gitea instance. Default: https://gitea.com/
# URL of the Gitea instance. Default: https://gitea.com/
gitea.url: https://gitea.com/

0 comments on commit 116daf4

Please sign in to comment.