This commit is contained in:
Benjamin Toby
2025-05-04 19:09:02 +01:00
parent 9ea903a401
commit 8d855ce94d
7 changed files with 15 additions and 38 deletions
@@ -1,6 +1,10 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = getAuthCookieNames;
const get_csrf_header_name_1 = __importDefault(require("../../../actions/get-csrf-header-name"));
/**
* # Grab Auth Cookie Names
*/
@@ -8,7 +12,7 @@ function getAuthCookieNames(params) {
var _a, _b;
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 cookiesCSRFName = (0, get_csrf_header_name_1.default)();
const cookieOneTimeCodeName = process.env.DSQL_COOKIES_ONE_TIME_CODE_NAME || "one-time-code";
const targetDatabase = ((_a = params === null || params === void 0 ? void 0 : params.database) === null || _a === void 0 ? void 0 : _a.replace(/^datasquirel_user_\d+_/, "")) ||
((_b = process.env.DSQL_DB_NAME) === null || _b === void 0 ? void 0 : _b.replace(/^datasquirel_user_\d+_/, ""));