mirror of https://github.com/status-im/codimd.git
Merge pull request #1426 from hackmdio/feat/support-google-hosted-name
Support hostedName in google OAuth provider
This commit is contained in:
commit
c9badcf2e4
|
@ -17,7 +17,10 @@ passport.use(new GoogleStrategy({
|
||||||
|
|
||||||
googleAuth.get('/auth/google', function (req, res, next) {
|
googleAuth.get('/auth/google', function (req, res, next) {
|
||||||
setReturnToFromReferer(req)
|
setReturnToFromReferer(req)
|
||||||
passport.authenticate('google', { scope: ['profile'] })(req, res, next)
|
passport.authenticate('google', {
|
||||||
|
scope: ['profile'],
|
||||||
|
hostedDomain: config.google.hostedDomain
|
||||||
|
})(req, res, next)
|
||||||
})
|
})
|
||||||
// google auth callback
|
// google auth callback
|
||||||
googleAuth.get('/auth/google/callback',
|
googleAuth.get('/auth/google/callback',
|
||||||
|
|
|
@ -133,7 +133,8 @@ module.exports = {
|
||||||
},
|
},
|
||||||
google: {
|
google: {
|
||||||
clientID: undefined,
|
clientID: undefined,
|
||||||
clientSecret: undefined
|
clientSecret: undefined,
|
||||||
|
hostedDomain: undefined
|
||||||
},
|
},
|
||||||
ldap: {
|
ldap: {
|
||||||
providerName: undefined,
|
providerName: undefined,
|
||||||
|
|
|
@ -105,7 +105,8 @@ module.exports = {
|
||||||
},
|
},
|
||||||
google: {
|
google: {
|
||||||
clientID: process.env.CMD_GOOGLE_CLIENTID,
|
clientID: process.env.CMD_GOOGLE_CLIENTID,
|
||||||
clientSecret: process.env.CMD_GOOGLE_CLIENTSECRET
|
clientSecret: process.env.CMD_GOOGLE_CLIENTSECRET,
|
||||||
|
hostedDomain: process.env.CMD_GOOGLE_HOSTEDDOMAIN
|
||||||
},
|
},
|
||||||
ldap: {
|
ldap: {
|
||||||
providerName: process.env.CMD_LDAP_PROVIDERNAME,
|
providerName: process.env.CMD_LDAP_PROVIDERNAME,
|
||||||
|
|
Loading…
Reference in New Issue