mirror of https://github.com/status-im/codimd.git
Merge pull request #1512 from stregouet/oauth2-state
fix: add state parameter for oauth2
This commit is contained in:
commit
54ab0a08de
|
@ -16,6 +16,7 @@ passport.use(new OAuth2CustomStrategy({
|
|||
clientSecret: config.oauth2.clientSecret,
|
||||
callbackURL: config.serverURL + '/auth/oauth2/callback',
|
||||
userProfileURL: config.oauth2.userProfileURL,
|
||||
state: config.oauth2.state,
|
||||
scope: config.oauth2.scope
|
||||
}, passportGeneralCallback))
|
||||
|
||||
|
|
|
@ -100,6 +100,7 @@ module.exports = {
|
|||
userProfileDisplayNameAttr: 'displayName',
|
||||
userProfileEmailAttr: 'email',
|
||||
userProfilePhotoAttr: 'photo',
|
||||
state: true,
|
||||
scope: 'email'
|
||||
},
|
||||
facebook: {
|
||||
|
|
|
@ -94,6 +94,7 @@ module.exports = {
|
|||
tokenURL: process.env.CMD_OAUTH2_TOKEN_URL,
|
||||
userProfileURL: process.env.CMD_OAUTH2_USER_PROFILE_URL,
|
||||
scope: process.env.CMD_OAUTH2_SCOPE,
|
||||
state: process.env.CMD_OAUTH2_STATE,
|
||||
userProfileUsernameAttr: process.env.CMD_OAUTH2_USER_PROFILE_USERNAME_ATTR,
|
||||
userProfileDisplayNameAttr: process.env.CMD_OAUTH2_USER_PROFILE_DISPLAY_NAME_ATTR,
|
||||
userProfileEmailAttr: process.env.CMD_OAUTH2_USER_PROFILE_EMAIL_ATTR,
|
||||
|
|
Loading…
Reference in New Issue