diff options
author | ike | 2020-02-07 08:51:58 +0800 |
---|---|---|
committer | ike | 2020-02-08 15:57:22 +0800 |
commit | 197223dc81267efb22a63872a42f839b2276e1b6 (patch) | |
tree | c7c5b23decb47bf90c941d3e525785e2a1a88cf2 /lib/web/auth/google | |
parent | b3d4cdbcebe1690bf5211d778ff6f8a0f9f5e518 (diff) |
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>
Diffstat (limited to 'lib/web/auth/google')
-rw-r--r-- | lib/web/auth/google/index.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/web/auth/google/index.js b/lib/web/auth/google/index.js index feb83025..6edf07a9 100644 --- a/lib/web/auth/google/index.js +++ b/lib/web/auth/google/index.js @@ -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', |