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:
parent
aae69cb5e4
commit
8e0c60f5be
70 changed files with 753 additions and 427 deletions
|
@ -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(
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue