auth provider refactor

This commit is contained in:
Jan Prochazka
2024-07-26 09:15:22 +02:00
parent c3c9ad1aed
commit dd964273cd
6 changed files with 76 additions and 29 deletions

View File

@@ -2,10 +2,15 @@ const crypto = require('crypto');
const tokenSecret = crypto.randomUUID();
export function getTokenLifetime() {
function getTokenLifetime() {
return process.env.TOKEN_LIFETIME || '1d';
}
export function getTokenSecret() {
function getTokenSecret() {
return tokenSecret;
}
module.exports = {
getTokenLifetime,
getTokenSecret,
};