Installation
CI / ci (push) Canceled after 0s

install token now shown in dashboard until install completes.
This commit is contained in:
Stefan Lazic committed 2026-09-06 20:14:25 +01:00
1 parent d7a8b15482
commit e9e28a243f
18 files changed
+1977 -15

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { randomBytes } from "node:crypto";
/**
* Cryptographically secure hex string of `bytes` random bytes (i.e.
* `bytes * 2` hex characters) — the one generator used for every secret
* this app creates on a business's behalf (database password,
* `AUTH_SECRET`, `INSTALLATION_TOKEN`, `CRON_SECRET`). Pulled out of
* provisioning.ts into its own module so a later rotate/regenerate
* action (e.g. re-issuing `INSTALLATION_TOKEN`) reuses this exact
* mechanism instead of a second, duplicate one.
*/
export function randomHex(bytes: number): string {
return randomBytes(bytes).toString("hex");
}