mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-06-05 01:04:25 -04:00
Merge pull request #278 from elespike/master
Add OIDC scopes for email & profile retrieval
This commit is contained in:
commit
4104f9835d
6 changed files with 10 additions and 5 deletions
|
@ -92,7 +92,8 @@ module.exports = {
|
|||
authorizationURL: undefined,
|
||||
tokenURL: undefined,
|
||||
clientID: undefined,
|
||||
clientSecret: undefined
|
||||
clientSecret: undefined,
|
||||
scope: 'openid email profile'
|
||||
},
|
||||
facebook: {
|
||||
clientID: undefined,
|
||||
|
|
|
@ -87,7 +87,8 @@ module.exports = {
|
|||
tokenURL: process.env.CMD_OAUTH2_TOKEN_URL,
|
||||
authorizationURL: process.env.CMD_OAUTH2_AUTHORIZATION_URL,
|
||||
clientID: process.env.CMD_OAUTH2_CLIENT_ID,
|
||||
clientSecret: process.env.CMD_OAUTH2_CLIENT_SECRET
|
||||
clientSecret: process.env.CMD_OAUTH2_CLIENT_SECRET,
|
||||
scope: process.env.CMD_OAUTH2_SCOPE
|
||||
},
|
||||
dropbox: {
|
||||
clientID: process.env.CMD_DROPBOX_CLIENTID,
|
||||
|
|
|
@ -76,7 +76,8 @@ module.exports = {
|
|||
tokenURL: process.env.HMD_OAUTH2_TOKEN_URL,
|
||||
authorizationURL: process.env.HMD_OAUTH2_AUTHORIZATION_URL,
|
||||
clientID: process.env.HMD_OAUTH2_CLIENT_ID,
|
||||
clientSecret: process.env.HMD_OAUTH2_CLIENT_SECRET
|
||||
clientSecret: process.env.HMD_OAUTH2_CLIENT_SECRET,
|
||||
scope: process.env.HMD_OAUTH2_SCOPE
|
||||
},
|
||||
dropbox: {
|
||||
clientID: process.env.HMD_DROPBOX_CLIENTID,
|
||||
|
|
|
@ -89,7 +89,8 @@ passport.use(new OAuth2CustomStrategy({
|
|||
clientID: config.oauth2.clientID,
|
||||
clientSecret: config.oauth2.clientSecret,
|
||||
callbackURL: config.serverURL + '/auth/oauth2/callback',
|
||||
userProfileURL: config.oauth2.userProfileURL
|
||||
userProfileURL: config.oauth2.userProfileURL,
|
||||
scope: config.oauth2.scope
|
||||
}, passportGeneralCallback))
|
||||
|
||||
oauth2Auth.get('/auth/oauth2', function (req, res, next) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue