Initial commit
users route is incomplete can auth using SIWE and SIWS when used with zkl-roadhog more to come...
This commit is contained in:
11
utils/index.js
Normal file
11
utils/index.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const crypto = require('crypto');
|
||||
|
||||
function generateNonce() {
|
||||
return crypto.randomBytes(32).toString('hex');
|
||||
}
|
||||
|
||||
function generateBearerToken() {
|
||||
return crypto.randomBytes(32).toString('base64');
|
||||
}
|
||||
|
||||
module.exports = { generateNonce, generateBearerToken }
|
||||
Reference in New Issue
Block a user