Skip to content

Commit

Permalink
Replace length param with hardcoded length (6)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonmoiseev committed Sep 15, 2024
1 parent 67ec470 commit 0499929
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/how-to/dbauth-passwordless.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export const generateLoginToken = async ({ email }) => {
}

// here we're going to generate a random password of 6 numbers
const randomNumber = crypto.randomInt(0, 1_000_000).toString().padStart(length, "0")
const randomNumber = crypto.randomInt(0, 1_000_000).toString().padStart(6, "0")
console.log({ randomNumber }) // email the user this number

const [loginToken, salt] = hashPassword(randomNumber)
Expand Down

0 comments on commit 0499929

Please sign in to comment.