feat: core improvements + local fs provider + UI fixes
This commit is contained in:
@@ -15,7 +15,7 @@ module.exports = {
|
||||
clientSecret: conf.clientSecret,
|
||||
callbackURL: conf.callbackURL
|
||||
}, function (accessToken, refreshToken, profile, cb) {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -20,7 +20,7 @@ module.exports = {
|
||||
let waadProfile = jwt.decode(params.id_token)
|
||||
waadProfile.id = waadProfile.oid
|
||||
waadProfile.provider = 'azure'
|
||||
WIKI.db.users.processProfile(waadProfile).then((user) => {
|
||||
WIKI.models.users.processProfile(waadProfile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -13,7 +13,7 @@ module.exports = {
|
||||
ssoBaseURL: conf.ssoBaseURL,
|
||||
serverBaseURL: conf.serverBaseURL
|
||||
}, (profile, cb) => {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -15,7 +15,7 @@ module.exports = {
|
||||
callbackURL: conf.callbackURL,
|
||||
scope: 'identify email'
|
||||
}, function (accessToken, refreshToken, profile, cb) {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -15,7 +15,7 @@ module.exports = {
|
||||
clientSecret: conf.clientSecret,
|
||||
callbackURL: conf.callbackURL
|
||||
}, (accessToken, refreshToken, profile, cb) => {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -15,7 +15,7 @@ module.exports = {
|
||||
callbackURL: conf.callbackURL,
|
||||
profileFields: ['id', 'displayName', 'email']
|
||||
}, function (accessToken, refreshToken, profile, cb) {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -15,7 +15,7 @@ module.exports = {
|
||||
callbackURL: conf.callbackURL,
|
||||
scope: ['user:email']
|
||||
}, (accessToken, refreshToken, profile, cb) => {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -14,7 +14,7 @@ module.exports = {
|
||||
clientSecret: conf.clientSecret,
|
||||
callbackURL: conf.callbackURL
|
||||
}, (accessToken, refreshToken, profile, cb) => {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -29,7 +29,7 @@ module.exports = {
|
||||
}, (profile, cb) => {
|
||||
profile.provider = 'ldap'
|
||||
profile.id = profile.dn
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -13,7 +13,7 @@ module.exports = {
|
||||
usernameField: 'email',
|
||||
passwordField: 'password'
|
||||
}, (uEmail, uPassword, done) => {
|
||||
WIKI.db.users.query().findOne({
|
||||
WIKI.models.users.query().findOne({
|
||||
email: uEmail,
|
||||
providerKey: 'local'
|
||||
}).then((user) => {
|
||||
|
@@ -14,7 +14,7 @@ module.exports = {
|
||||
clientSecret: conf.clientSecret,
|
||||
callbackURL: conf.callbackURL
|
||||
}, function (accessToken, refreshToken, profile, cb) {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -16,7 +16,7 @@ module.exports = {
|
||||
clientSecret: conf.clientSecret,
|
||||
callbackURL: conf.callbackURL
|
||||
}, (accessToken, refreshToken, profile, cb) => {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -14,7 +14,7 @@ module.exports = {
|
||||
clientSecret: conf.clientSecret,
|
||||
callbackURL: conf.callbackURL
|
||||
}, (accessToken, refreshToken, profile, cb) => {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
@@ -15,7 +15,7 @@ module.exports = {
|
||||
callbackURL: conf.callbackURL,
|
||||
scope: 'user_read'
|
||||
}, function (accessToken, refreshToken, profile, cb) {
|
||||
WIKI.db.users.processProfile(profile).then((user) => {
|
||||
WIKI.models.users.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
return cb(err, null) || true
|
||||
|
Reference in New Issue
Block a user