pull/7742/merge
Rafal Piotrowski 1 month ago committed by GitHub
commit c504ea0864
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -312,8 +312,14 @@ module.exports = class User extends Model {
session: !strInfo.useForm,
scope: strInfo.scopes ? strInfo.scopes : null
}, async (err, user, info) => {
if (err) { return reject(err) }
if (!user) { return reject(new WIKI.Error.AuthLoginFailed()) }
if (err) {
WIKI.logger.warn(`Error trying to authenticate with strategy ${selStrategy.key}: ${JSON.stringify({ err, info })}`)
return reject(err)
}
if (!user) {
WIKI.logger.info(`Authentication failed with strategy ${selStrategy.key}: ${JSON.stringify(info)}`)
return reject(new WIKI.Error.AuthLoginFailed())
}
try {
const resp = await WIKI.models.users.afterLoginChecks(user, context, {

Loading…
Cancel
Save