Pull in GitHub settings for production properly

This commit is contained in:
R. Tyler Croy 2018-09-20 13:31:01 -07:00
parent 1e3b9cf060
commit a9f849d3a0
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
1 changed files with 6 additions and 0 deletions

View File

@ -59,6 +59,12 @@ app.configure(authentication(app.get('authentication')));
app.configure(jwt());
const githubSettings = app.get('github');
if (process.env.NODE_ENV == 'production') {
githubSettings.clientID = process.env.CLIENT_ID;
githubSettings.clientSecret = process.env.CLIENT_SECRET;
}
app.configure(oauth2(Object.assign(githubSettings, {
name: 'github',
Strategy: Strategy,