Skip to content

Commit

Permalink
fix: auth works now, after passing hashed password to db user creation
Browse files Browse the repository at this point in the history
  • Loading branch information
maoo committed Feb 27, 2024
1 parent 7ae25ff commit 1bbda77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/db/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const passwordHash = require('password-hash');
const config = require('../config');
let sink;
if (config.getDatabase().type === 'mongo') {
Expand All @@ -17,6 +18,7 @@ module.exports.createUser = async (username, password, email, gitAccount, admin

const data = {
username: username,
password: passwordHash.generate(password),
gitAccount: gitAccount,
email: email,
admin: admin,
Expand Down

0 comments on commit 1bbda77

Please sign in to comment.