Skip to content

Commit

Permalink
Fix: Email/Password auth salt not being used in hash
Browse files Browse the repository at this point in the history
The `bcrypt.hash` function was not using the generated salt value, so everybody was using `SALT_ROUNDS` only.
  • Loading branch information
donskifarrell authored and Nilan Marktanner committed Dec 4, 2017
1 parent a106409 commit 4515dcd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth/email-password/src/signup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default async (event: FunctionEvent<EventData>) => {

// create password hash
const salt = bcrypt.genSaltSync(SALT_ROUNDS)
const hash = await bcrypt.hash(password, SALT_ROUNDS)
const hash = await bcrypt.hash(password, salt)

// create new user
const userId = await createGraphcoolUser(api, email, hash)
Expand Down

0 comments on commit 4515dcd

Please sign in to comment.