feat: oauth2 login (wip)
This commit is contained in:
@@ -14,12 +14,14 @@ module.exports = {
|
||||
clientID: conf.clientId,
|
||||
clientSecret: conf.clientSecret,
|
||||
callbackURL: conf.callbackURL
|
||||
}, function (accessToken, refreshToken, profile, cb) {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
})
|
||||
}, async (accessToken, refreshToken, extraParams, profile, cb) => {
|
||||
console.info(accessToken, refreshToken, extraParams, profile)
|
||||
try {
|
||||
const user = WIKI.models.users.processProfile({ profile, provider: 'auth0' })
|
||||
cb(null, user)
|
||||
} catch (err) {
|
||||
cb(err, null)
|
||||
}
|
||||
}
|
||||
))
|
||||
}
|
||||
|
@@ -7,6 +7,10 @@ color: deep-orange
|
||||
website: https://auth0.com/
|
||||
isAvailable: true
|
||||
useForm: false
|
||||
scopes:
|
||||
- openid
|
||||
- profile
|
||||
- email
|
||||
props:
|
||||
domain:
|
||||
type: String
|
||||
|
Reference in New Issue
Block a user