use crypto if available

This commit is contained in:
Gani Georgiev
2023-08-22 22:00:09 +03:00
parent 2863763a27
commit 6ca1f5c431
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -21,7 +21,9 @@
if (secret) {
secret = undefined;
} else {
secret = CommonHelper.randomString(50);
secret = crypto?.randomUUID
? crypto.randomUUID() + CommonHelper.randomString(14)
: CommonHelper.randomString(50);
}
}}
>