Merge pull request #952 from getmaxun/api-key

fix: modify api key generation
This commit is contained in:
Karishma Shukla
2026-01-22 19:01:38 +05:30
committed by GitHub

View File

@@ -1,3 +1,5 @@
import crypto from 'crypto';
export const genAPIKey = (): string => {
return [...Array(30)].map(() => ((Math.random() * 36) | 0).toString(36)).join('');
return crypto.randomBytes(24).toString('base64url');
};