diff --git a/packages/builder/src/pages/builder/portal/manage/users/_components/BasicOnboardingModal.svelte b/packages/builder/src/pages/builder/portal/manage/users/_components/BasicOnboardingModal.svelte index 501d6a1511..03f607127f 100644 --- a/packages/builder/src/pages/builder/portal/manage/users/_components/BasicOnboardingModal.svelte +++ b/packages/builder/src/pages/builder/portal/manage/users/_components/BasicOnboardingModal.svelte @@ -4,25 +4,7 @@ import { users } from "stores/portal" const [email, error, touched] = createValidationStore("", emailValidator) - const password = generatePassword() - - function generatePassword() { - return Array(30) - .fill( - "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~!@-#$" - ) - .map( - x => - x[ - Math.floor( - (crypto.getRandomValues(new Uint32Array(1))[0] / - (0xffffffff + 1)) * - x.length - ) - ] - ) - .join("") - } + const password = Math.random().toString(36).substr(2, 20) async function createUser() { const res = await users.create({ email: $email, password })