Merge branch 'master' into update-pro-3

This commit is contained in:
Michael Drury 2024-08-30 14:12:02 +01:00 committed by GitHub
commit 2d030d442b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -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 {