Merge pull request #952 from getmaxun/api-key
fix: modify api key generation
This commit is contained in:
@@ -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');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user