Skip to content

Commit

Permalink
Merge branch 'master' into feat/row-action-view-security
Browse files Browse the repository at this point in the history
  • Loading branch information
adrinr authored Aug 30, 2024
2 parents a7a5041 + 4d9f87e commit 2b49c3f
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
export let user
const password = Math.random().toString(36).slice(2, 20)
const generatePassword = length => {
const array = new Uint8Array(length)
crypto.getRandomValues(array)
return Array.from(array, byte => byte.toString(36).padStart(2, "0"))
.join("")
.slice(0, length)
}
const password = generatePassword(12)
async function resetPassword() {
try {
Expand Down

0 comments on commit 2b49c3f

Please sign in to comment.