1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-21 06:09:43 +02:00

fix: OIDC finalization and refactoring

This commit is contained in:
Maksim Eltyshev 2023-10-17 19:18:19 +02:00
parent aae69cb5e4
commit 8e0c60f5be
70 changed files with 753 additions and 427 deletions

View file

@ -9,7 +9,7 @@ const valuesValidator = (value) => {
return false;
}
if (!_.isString(value.password)) {
if (!_.isNil(value.password) && !_.isString(value.password)) {
return false;
}
@ -40,6 +40,10 @@ module.exports = {
async fn(inputs) {
const { values } = inputs;
if (values.password) {
values.password = bcrypt.hashSync(values.password, 10);
}
if (values.username) {
values.username = values.username.toLowerCase();
}
@ -47,7 +51,6 @@ module.exports = {
const user = await User.create({
...values,
email: values.email.toLowerCase(),
password: bcrypt.hashSync(values.password, 10),
})
.intercept(
{