diff --git a/package.json b/package.json index 1a994358a50..4e96eda08e5 100644 --- a/package.json +++ b/package.json @@ -79,6 +79,7 @@ "nodemailer": "~1.3.0", "object.assign": "^3.0.0", "passport-facebook": "^2.0.0", + "passport-github": "^0.1.5", "passport-google-oauth2": "^0.1.6", "passport-linkedin-oauth2": "^1.2.1", "passport-local": "^1.0.0", diff --git a/server/passport-providers.js b/server/passport-providers.js index b60ad8f51ec..ddd29f64db2 100644 --- a/server/passport-providers.js +++ b/server/passport-providers.js @@ -127,5 +127,19 @@ module.exports = { state: process.env.LINKEDIN_STATE }, failureFlash: true + }, + 'github-login': { + provider: 'github', + authScheme: 'oauth2', + module: 'passport-github', + authPath: '/auth/github', + callbackURL: '/auth/github/callback', + callbackPath: '/auth/github/callback', + successRedirect: successRedirect, + failureRedirect: failureRedirect, + clientID: process.env.GITHUB_ID, + clientSecret: process.env.GITHUB_SECRET, + scope: ['email'], + failureFlash: true } }; diff --git a/server/views/account/signin.jade b/server/views/account/signin.jade index c19384964b2..878b278ba45 100644 --- a/server/views/account/signin.jade +++ b/server/views/account/signin.jade @@ -2,18 +2,21 @@ extends ../layout block content .jumbotron.text-center h2 Sign in with one of these options: - a.btn.btn-lg.btn-block.btn-google-plus.btn-social(href='/auth/google') - i.fa.fa-google-plus - | Sign in with Google - a.btn.btn-lg.btn-block.btn-facebook.btn-social(href='/auth/facebook') - i.fa.fa-facebook - | Sign in with Facebook - a.btn.btn-lg.btn-block.btn-linkedin.btn-social(href='/auth/linkedin') - i.fa.fa-linkedin - | Sign in with LinkedIn + a.btn.btn-lg.btn-block.btn-twitter.btn-social(href='/auth/github') + i.fa.fa-github + | Sign in with Github a.btn.btn-lg.btn-block.btn-twitter.btn-social(href='/auth/twitter') i.fa.fa-twitter | Sign in with Twitter + a.btn.btn-lg.btn-block.btn-facebook.btn-social(href='/auth/facebook') + i.fa.fa-facebook + | Sign in with Facebook + a.btn.btn-lg.btn-block.btn-google-plus.btn-social(href='/auth/google') + i.fa.fa-google-plus + | Sign in with Google + a.btn.btn-lg.btn-block.btn-linkedin.btn-social(href='/auth/linkedin') + i.fa.fa-linkedin + | Sign in with LinkedIn br p a(href="/email-signup") Or sign up using your email address here.