fix: allow local (and overridden) login strategies to pass Error objects back

v1.18.x
Julian Lam 4 years ago
parent 17693dd5ca
commit 98b72ca572

@ -266,7 +266,9 @@ function continueLogin(strategy, req, res, next) {
}
if (!userData) {
if (typeof info === 'object') {
if (info instanceof Error) {
info = info.message;
} else if (typeof info === 'object') {
info = '[[error:invalid-username-or-password]]';
}
return helpers.noScriptErrors(req, res, info, 403);

Loading…
Cancel
Save