mirror of
https://github.com/plankanban/planka.git
synced 2025-12-18 09:13:21 +03:00
fix: OIDC finalization and refactoring
This commit is contained in:
@@ -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(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user