feat: social login providers with dynamic instances
This commit is contained in:
1 parent
a7ddafd4aa
commit
32d67adee1
28 files changed
+147
-107
No files matched your search
@@ -14,16 +14,16 @@ module.exports = {
|
||||
clientID: conf.clientId,
|
||||
clientSecret: conf.clientSecret,
|
||||
callbackURL: conf.callbackURL,
|
||||
scope: ['User.Read', 'email', 'openid', 'profile']
|
||||
}, async (accessToken, refreshToken, profile, cb) => {
|
||||
console.info(profile)
|
||||
scope: ['User.Read', 'email', 'openid', 'profile'],
|
||||
passReqToCallback: true
|
||||
}, async (req, accessToken, refreshToken, profile, cb) => {
|
||||
try {
|
||||
const user = await WIKI.models.users.processProfile({
|
||||
providerKey: req.params.strategy,
|
||||
profile: {
|
||||
...profile,
|
||||
picture: _.get(profile, 'photos[0].value', '')
|
||||
},
|
||||
providerKey: 'microsoft'
|
||||
}
|
||||
})
|
||||
cb(null, user)
|
||||
} catch (err) {
|
||||
|
||||
Reference in new issue
Block a user