refactor: fix password auth
refactor: move tabs around
This commit is contained in:
parent
316663be32
commit
e397bc884b
17 changed files with 49 additions and 26 deletions
|
@ -106,13 +106,12 @@ export async function POST(req: Request, meta: Record<string, any>): Promise<Res
|
|||
|
||||
await USERS.create(user);
|
||||
|
||||
const salt = await bcrypt.genSalt();
|
||||
const hashed_password_value = await bcrypt.hash(password_hash, salt);
|
||||
// automatically salted
|
||||
const hashed_password_value = await bcrypt.hash(password_hash);
|
||||
|
||||
const password_entry: PASSWORD_ENTRY = {
|
||||
user_id: user.id,
|
||||
hash: hashed_password_value,
|
||||
salt,
|
||||
timestamps: {
|
||||
created: now,
|
||||
updated: now
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue