mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 07:06:00 +00:00
auth providert refactor WIP
This commit is contained in:
11
packages/api/src/auth/authCommon.js
Normal file
11
packages/api/src/auth/authCommon.js
Normal file
@@ -0,0 +1,11 @@
|
||||
const crypto = require('crypto');
|
||||
|
||||
const tokenSecret = crypto.randomUUID();
|
||||
|
||||
export function getTokenLifetime() {
|
||||
return process.env.TOKEN_LIFETIME || '1d';
|
||||
}
|
||||
|
||||
export function getTokenSecret() {
|
||||
return tokenSecret;
|
||||
}
|
||||
Reference in New Issue
Block a user