fix: Incorrect indentation (eslint)
This commit is contained in:
parent
f37cbac332
commit
a1b6dfb308
4
.vscode/settings.json
vendored
4
.vscode/settings.json
vendored
@ -1,8 +1,8 @@
|
||||
{
|
||||
"eslint.enable": true,
|
||||
"eslint.autoFixOnSave": false,
|
||||
"eslint.autoFixOnSave": true,
|
||||
"puglint.enable": true,
|
||||
"standard.enable": false,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnSave": false,
|
||||
"editor.tabSize": 2
|
||||
}
|
||||
|
@ -32,8 +32,7 @@ module.exports = function (passport) {
|
||||
new LocalStrategy({
|
||||
usernameField: 'email',
|
||||
passwordField: 'password'
|
||||
},
|
||||
(uEmail, uPassword, done) => {
|
||||
}, (uEmail, uPassword, done) => {
|
||||
db.User.findOne({ email: uEmail, provider: 'local' }).then((user) => {
|
||||
if (user) {
|
||||
return user.validatePassword(uPassword).then(() => {
|
||||
@ -60,8 +59,7 @@ module.exports = function (passport) {
|
||||
clientID: appconfig.auth.google.clientId,
|
||||
clientSecret: appconfig.auth.google.clientSecret,
|
||||
callbackURL: appconfig.host + '/login/google/callback'
|
||||
},
|
||||
(accessToken, refreshToken, profile, cb) => {
|
||||
}, (accessToken, refreshToken, profile, cb) => {
|
||||
db.User.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
@ -80,8 +78,7 @@ module.exports = function (passport) {
|
||||
clientID: appconfig.auth.microsoft.clientId,
|
||||
clientSecret: appconfig.auth.microsoft.clientSecret,
|
||||
callbackURL: appconfig.host + '/login/ms/callback'
|
||||
},
|
||||
function (accessToken, refreshToken, profile, cb) {
|
||||
}, function (accessToken, refreshToken, profile, cb) {
|
||||
db.User.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
@ -101,8 +98,7 @@ module.exports = function (passport) {
|
||||
clientSecret: appconfig.auth.facebook.clientSecret,
|
||||
callbackURL: appconfig.host + '/login/facebook/callback',
|
||||
profileFields: ['id', 'displayName', 'email']
|
||||
},
|
||||
function (accessToken, refreshToken, profile, cb) {
|
||||
}, function (accessToken, refreshToken, profile, cb) {
|
||||
db.User.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
@ -121,9 +117,8 @@ module.exports = function (passport) {
|
||||
clientID: appconfig.auth.github.clientId,
|
||||
clientSecret: appconfig.auth.github.clientSecret,
|
||||
callbackURL: appconfig.host + '/login/github/callback',
|
||||
scope: [ 'user:email' ]
|
||||
},
|
||||
(accessToken, refreshToken, profile, cb) => {
|
||||
scope: ['user:email']
|
||||
}, (accessToken, refreshToken, profile, cb) => {
|
||||
db.User.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
@ -142,8 +137,7 @@ module.exports = function (passport) {
|
||||
clientID: appconfig.auth.slack.clientId,
|
||||
clientSecret: appconfig.auth.slack.clientSecret,
|
||||
callbackURL: appconfig.host + '/login/slack/callback'
|
||||
},
|
||||
(accessToken, refreshToken, profile, cb) => {
|
||||
}, (accessToken, refreshToken, profile, cb) => {
|
||||
db.User.processProfile(profile).then((user) => {
|
||||
return cb(null, user) || true
|
||||
}).catch((err) => {
|
||||
@ -174,8 +168,7 @@ module.exports = function (passport) {
|
||||
},
|
||||
usernameField: 'email',
|
||||
passReqToCallback: false
|
||||
},
|
||||
(profile, cb) => {
|
||||
}, (profile, cb) => {
|
||||
profile.provider = 'ldap'
|
||||
profile.id = profile.dn
|
||||
db.User.processProfile(profile).then((user) => {
|
||||
@ -199,8 +192,7 @@ module.exports = function (passport) {
|
||||
callbackURL: appconfig.host + '/login/azure/callback',
|
||||
resource: appconfig.auth.azure.resource,
|
||||
tenant: appconfig.auth.azure.tenant
|
||||
},
|
||||
(accessToken, refreshToken, params, profile, cb) => {
|
||||
}, (accessToken, refreshToken, params, profile, cb) => {
|
||||
let waadProfile = jwt.decode(params.id_token)
|
||||
waadProfile.id = waadProfile.oid
|
||||
waadProfile.provider = 'azure'
|
||||
|
@ -19,7 +19,7 @@ module.exports = {
|
||||
*
|
||||
* @return {Object} DB instance
|
||||
*/
|
||||
init () {
|
||||
init() {
|
||||
let self = this
|
||||
|
||||
let dbModelsPath = path.join(SERVERPATH, 'models')
|
||||
|
Loading…
Reference in New Issue
Block a user