большая разработка аутентификации

This commit is contained in:
2023-03-02 11:46:14 +10:00
parent 0aae5b6558
commit 687db4e4b1
129 changed files with 2282 additions and 646 deletions

View File

@@ -0,0 +1,24 @@
'use strict';
class password {
/**
* Сгенерировать
*
* @param {number} length Длина (количество слов в мнемоническом, либо символов в классическом)
*
* @return {object} {(string) password, (array) errors}
*/
static async generate(length = 12, type = "classic") {
return await fetch("https://account.mirzaev.sexy/api/generate/password", {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
},
body: `length=${length}&type=${type}&return=password,errors`,
})
.then((response) => response.json())
.then((data) => {
return data;
});
}
}