feat: social login providers with dynamic instances
This commit is contained in:
@@ -14,15 +14,16 @@ module.exports = {
|
||||
clientID: conf.clientId,
|
||||
clientSecret: conf.clientSecret,
|
||||
callbackURL: conf.callbackURL,
|
||||
team: conf.team
|
||||
}, async (accessToken, scopes, team, extra, { user: userProfile }, cb) => {
|
||||
team: conf.team,
|
||||
passReqToCallback: true
|
||||
}, async (req, accessToken, scopes, team, extra, { user: userProfile }, cb) => {
|
||||
try {
|
||||
const user = await WIKI.models.users.processProfile({
|
||||
providerKey: req.params.strategy,
|
||||
profile: {
|
||||
...userProfile,
|
||||
picture: _.get(userProfile, 'image_48', '')
|
||||
},
|
||||
providerKey: 'slack'
|
||||
}
|
||||
})
|
||||
cb(null, user)
|
||||
} catch (err) {
|
||||
|
Reference in New Issue
Block a user