datasquirel/package-shared/functions/backend/cookies/get-auth-cookie-names.js

14 lines
454 B
JavaScript
Raw Normal View History

2024-12-06 10:31:24 +00:00
module.exports = function getAuthCookieNames() {
const cookiesPrefix = process.env.DSQL_COOKIES_PREFIX || "dsql_";
const cookiesKeyName = process.env.DSQL_COOKIES_KEY_NAME || "key";
const cookiesCSRFName = process.env.DSQL_COOKIES_CSRF_NAME || "csrf";
const keyCookieName = cookiesPrefix + cookiesKeyName;
const csrfCookieName = cookiesPrefix + cookiesCSRFName;
return {
keyCookieName,
csrfCookieName,
};
};