6 lines
169 B
TypeScript
6 lines
169 B
TypeScript
import cryptoRandomString from "crypto-random-string";
|
|
|
|
const KEY_LENGTH = 42;
|
|
|
|
export const generateApiKey = () => `opc_${cryptoRandomString({ length: KEY_LENGTH })}`;
|