Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support authentication through Github Enterprise #186

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ if (auth.github.enabled) {
passport.use(new passportGithub({ // eslint-disable-line new-cap
clientID: auth.github.clientId,
clientSecret: auth.github.clientSecret,
callbackURL: redirectURL
callbackURL: redirectURL,
authorizationURL: auth.github.authorizationURL,
tokenURL: auth.github.tokenURL,
userProfileURL: auth.github.userProfileURL
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if those values are not provided in the config.yaml (they'll be set as undefined and this would probably cause issues)?

The config.js needs also to be updated to provide default values (empty strings?) for those.

Also, we could test for these values to be present before using them.

And finally, any configuration option needs also to be referenced in the README file.

Thanks :)

},
function (accessToken, refreshToken, profile, done) {
usedAuthentication('github')
Expand Down