souramoo / commentoplusplus

Commento with out of the box patches and updates to add useful features and fixes. Also with one-click deploy to Heroku so you can get up and running fast.
MIT License
389 stars 62 forks source link

Option to override Github URL for Github Enterprise SSO compatiblity #112

Open AlphaJack opened 2 years ago

AlphaJack commented 2 years ago

Can you add an option to override the default Github Oauth2 default endpoint? I would like to authenticate Commento users with a Github Enterprise compatible IDP but I need Commento to point to a custom domain: https://goauthentik.io/docs/providers/oauth2/#github-compatibility

This means configuring three variables instead of two:

COMMENTO_GITHUB_URL=https://sso.example.org/
COMMENTO_GITHUB_KEY=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
COMMENTO_GITHUB_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The endpoints would remain the same, but from https://sso.example.org instead of https://github.com:

Endpoint URL
Authorization /login/oauth/authorize
Token /login/oauth/access_token
User Info /user
User Teams Info /user/teams
souramoo commented 2 years ago

Authentik looks like a really cool project to save time bootstrapping new websites etc! I will check it out for some other projects I have in mind :)

This is easy enough to do, will add support for this shortly.