Skip to content

Commit 3d1d03f

Browse files
committed
Make oauth2 provider name accessible
Right now the feature exists but is almost not usable since the only way to configure it is to know that it exists from reading the source code and add it to config.json. This patch provides all needed changes so it can be used by everyone including documentation. Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
1 parent f186f73 commit 3d1d03f

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ There are some config settings you need to change in the files below.
236236
| `CMD_OAUTH2_AUTHORIZATION_URL` | `https://example.com` | authorization URL of your provider, please refer to the documentation of your OAuth2 provider (no default value) |
237237
| `CMD_OAUTH2_CLIENT_ID` | `afae02fckafd...` | you will get this from your OAuth2 provider when you register CodiMD as OAuth2-client, (no default value) |
238238
| `CMD_OAUTH2_CLIENT_SECRET` | `afae02fckafd...` | you will get this from your OAuth2 provider when you register CodiMD as OAuth2-client, (no default value) |
239+
| `CMD_OAUTH2_PROVIDERNAME` | `My institution` | Optional name to be displayed at login form indicating the oAuth2 provider |
239240
| `CMD_IMGUR_CLIENTID` | no example | Imgur API client id |
240241
| `CMD_EMAIL` | `true` or `false` | set to allow email signin |
241242
| `CMD_ALLOW_PDF_EXPORT` | `true` or `false` | Enable or disable PDF exports |

lib/config/default.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ module.exports = {
8383
},
8484
// authentication
8585
oauth2: {
86+
providerName: undefined,
8687
authorizationURL: undefined,
8788
tokenURL: undefined,
8889
clientID: undefined,

lib/config/environment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ module.exports = {
7575
clientSecret: process.env.CMD_MATTERMOST_CLIENTSECRET
7676
},
7777
oauth2: {
78+
providerName: process.env.CMD_OAUTH2_PROVIDERNAME,
7879
baseURL: process.env.CMD_OAUTH2_BASEURL,
7980
userProfileURL: process.env.CMD_OAUTH2_USER_PROFILE_URL,
8081
userProfileUsernameAttr: process.env.CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR,

0 commit comments

Comments
 (0)