diff options
author | Max Wu | 2017-09-27 21:40:26 +0800 |
---|---|---|
committer | GitHub | 2017-09-27 21:40:26 +0800 |
commit | 8168615e1067773e25afc2918f50eb518f8bd379 (patch) | |
tree | ed677075d12b9713ff080f56be6ad7da3f5ca998 /lib/web | |
parent | 2bdccd39964c8f6f643fd72ed7bdb648378068f8 (diff) | |
parent | 4ae8086301f3e07f8d1d910e8b80c739a76733a9 (diff) |
Merge pull request #541 from Stonesjtu/patch-1
Fix naming typo.
Diffstat (limited to 'lib/web')
-rw-r--r-- | lib/web/auth/google/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/web/auth/google/index.js b/lib/web/auth/google/index.js index bf2a260f..609c69cf 100644 --- a/lib/web/auth/google/index.js +++ b/lib/web/auth/google/index.js @@ -6,7 +6,7 @@ var GoogleStrategy = require('passport-google-oauth20').Strategy const config = require('../../../config') const {setReturnToFromReferer, passportGeneralCallback} = require('../utils') -let facebookAuth = module.exports = Router() +let googleAuth = module.exports = Router() passport.use(new GoogleStrategy({ clientID: config.google.clientID, @@ -14,12 +14,12 @@ passport.use(new GoogleStrategy({ callbackURL: config.serverurl + '/auth/google/callback' }, passportGeneralCallback)) -facebookAuth.get('/auth/google', function (req, res, next) { +googleAuth.get('/auth/google', function (req, res, next) { setReturnToFromReferer(req) passport.authenticate('google', { scope: ['profile'] })(req, res, next) }) // google auth callback -facebookAuth.get('/auth/google/callback', +googleAuth.get('/auth/google/callback', passport.authenticate('google', { successReturnToOrRedirect: config.serverurl + '/', failureRedirect: config.serverurl + '/' |