hotFix(validateCode): username comparation
This commit is contained in:
parent
8580fa0849
commit
c8f1b7c5ff
|
@ -58,7 +58,7 @@ module.exports = Self => {
|
||||||
fields: ['name', 'twoFactor']
|
fields: ['name', 'twoFactor']
|
||||||
}, myOptions);
|
}, myOptions);
|
||||||
|
|
||||||
if (user.name !== username)
|
if (user.name.toLowerCase() !== username.toLowerCase())
|
||||||
throw new UserError('Authentication failed');
|
throw new UserError('Authentication failed');
|
||||||
|
|
||||||
await authCode.destroy(myOptions);
|
await authCode.destroy(myOptions);
|
||||||
|
|
Loading…
Reference in New Issue