Add Google oauth variable: hostedDomain
Which is part of `passport-google-oauth2`. It could be used as whitelist to a domain supported by google oauth. Ref: https://github.com/jaredhanson/passport-google-oauth2/issues/3 Signed-off-by: ike <developer@ikewat.com>
This commit is contained in:
@@ -16,7 +16,7 @@ passport.use(new GoogleStrategy({
|
||||
}, passportGeneralCallback))
|
||||
|
||||
googleAuth.get('/auth/google', function (req, res, next) {
|
||||
passport.authenticate('google', { scope: ['profile'] })(req, res, next)
|
||||
passport.authenticate('google', { scope: ['profile'], hostedDomain: config.google.hostedDomain })(req, res, next)
|
||||
})
|
||||
// google auth callback
|
||||
googleAuth.get('/auth/google/callback',
|
||||
|
||||
Reference in New Issue
Block a user