mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
fix: allow local (and overridden) login strategies to pass Error objects back
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user