remove argon and use bcryptjs
This commit is contained in:
parent
549b0727a0
commit
37b1a507ea
|
@ -1356,6 +1356,11 @@
|
|||
"tweetnacl": "^0.14.3"
|
||||
}
|
||||
},
|
||||
"bcryptjs": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz",
|
||||
"integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms="
|
||||
},
|
||||
"before-after-hook": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
"devDependencies": {
|
||||
"lerna": "^3.14.1"
|
||||
},
|
||||
"dependencies": {},
|
||||
"dependencies": {
|
||||
"bcryptjs": "^2.4.3"
|
||||
},
|
||||
"scripts": {
|
||||
"bootstrap": "lerna bootstrap",
|
||||
"build": "lerna run build",
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "@budibase/core",
|
||||
"version": "0.0.15",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"bcryptjs": {
|
||||
"version": "2.4.3",
|
||||
"resolved": "https://registry.npmjs.org/bcryptjs/-/bcryptjs-2.4.3.tgz",
|
||||
"integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms="
|
||||
}
|
||||
}
|
||||
}
|
|
@ -72,6 +72,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@nx-js/compiler-util": "^2.0.0",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"date-fns": "^1.29.0",
|
||||
"lodash": "^4.17.13",
|
||||
"lunr": "^2.3.5",
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
import bcrypt from "bcryptjs";
|
||||
|
||||
function hash(password) {
|
||||
return bcrypt.hashSync(password, 10);
|
||||
}
|
||||
|
||||
function verify(password, hash) {
|
||||
return bcrypt.compareSync(password, hash);
|
||||
}
|
||||
|
||||
|
||||
export default {
|
||||
hash, verify
|
||||
};
|
|
@ -6,7 +6,7 @@ import getAuthApi from "./authApi";
|
|||
import getActionsApi from "./actionsApi";
|
||||
import {setupDatastore, createEventAggregator} from "./appInitialise";
|
||||
import {initialiseActions} from "./actionsApi/initialise"
|
||||
import {isSomething} from "./common";
|
||||
import {isSomething, crypto} from "./common";
|
||||
import {cleanup} from "./transactions/cleanup";
|
||||
import {generateFullPermissions} from "./authApi/generateFullPermissions";
|
||||
import {getApplicationDefinition} from "./templateApi/getApplicationDefinition";
|
||||
|
@ -111,5 +111,6 @@ export {initialiseData} from "./appInitialise/initialiseData";
|
|||
export {getDatabaseManager} from "./appInitialise/databaseManager";
|
||||
export {hierarchy};
|
||||
export {common};
|
||||
export {crypto};
|
||||
|
||||
export default getAppApis;
|
|
@ -1,4 +1,13 @@
|
|||
import {hash, verify} from "argon2";
|
||||
import bcrypt from "bcryptjs";
|
||||
|
||||
function hash(password) {
|
||||
return bcrypt.hashSync(password, 10);
|
||||
}
|
||||
|
||||
function verify(password, hash) {
|
||||
return bcrypt.compareSync(password, hash);
|
||||
}
|
||||
|
||||
|
||||
export default {
|
||||
hash, verify
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -19,7 +19,6 @@
|
|||
"@budibase/client": "^0.0.15",
|
||||
"@budibase/core": "^0.0.15",
|
||||
"@koa/router": "^8.0.0",
|
||||
"argon2": "^0.23.0",
|
||||
"fs-extra": "^8.1.0",
|
||||
"koa": "^2.7.0",
|
||||
"koa-body": "^4.1.0",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const crypto = require("../nodeCrypto");
|
||||
const {getAppApis, getTemplateApi} = require("@budibase/core");
|
||||
const {getAppApis, getTemplateApi, crypto } = require("@budibase/core");
|
||||
const getDatastore = require("./datastore");
|
||||
const { masterAppPackage } = require("../utilities/createAppPackage");
|
||||
const getDatabaseManager = require("../utilities/databaseManager");
|
||||
|
|
Loading…
Reference in New Issue