mirror of
https://github.com/filecoin-project/slate.git
synced 2024-09-20 02:37:09 +03:00
auth: adds warning for refactor
This commit is contained in:
parent
096657219a
commit
824a1c2ebd
@ -24,19 +24,12 @@ export default async (req, res) => {
|
||||
return res.status(500).send({ error: "A password was not provided." });
|
||||
}
|
||||
|
||||
// TODO(jim): Do not expose how many times you are salting
|
||||
// in OSS, add a random value as an environment variable.
|
||||
const salt = await BCrypt.genSalt(13);
|
||||
console.log({ salt });
|
||||
const hash = await BCrypt.hash(req.body.data.password, salt);
|
||||
console.log({ hash });
|
||||
const double = await BCrypt.hash(hash, salt);
|
||||
console.log({
|
||||
double,
|
||||
});
|
||||
|
||||
console.log(SECRET);
|
||||
|
||||
const triple = await BCrypt.hash(double, SECRET);
|
||||
console.log({ triple });
|
||||
|
||||
const FFS = await PG.ffs.create();
|
||||
const pg = FFS.token ? FFS.token : null;
|
||||
|
Loading…
Reference in New Issue
Block a user