Add expired user notification
This commit is contained in:
parent
2dced6f7a8
commit
85cca04321
|
@ -10,6 +10,7 @@ const { getTenantId } = require("../../tenancy")
|
||||||
|
|
||||||
const INVALID_ERR = "Invalid Credentials"
|
const INVALID_ERR = "Invalid Credentials"
|
||||||
const SSO_NO_PASSWORD = "SSO user does not have a password set"
|
const SSO_NO_PASSWORD = "SSO user does not have a password set"
|
||||||
|
const EXPIRED = "This account has expired. Please reset your password"
|
||||||
|
|
||||||
exports.options = {
|
exports.options = {
|
||||||
passReqToCallback: true,
|
passReqToCallback: true,
|
||||||
|
@ -46,8 +47,8 @@ exports.authenticate = async function (ctx, email, password, done) {
|
||||||
return authError(done, SSO_NO_PASSWORD)
|
return authError(done, SSO_NO_PASSWORD)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.error("User has no password", dbUser)
|
console.error("Non SSO usser has no password set", dbUser)
|
||||||
return authError(done, INVALID_ERR)
|
return authError(done, EXPIRED)
|
||||||
}
|
}
|
||||||
|
|
||||||
// authenticate
|
// authenticate
|
||||||
|
|
Loading…
Reference in New Issue