mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-30 22:49:27 +02:00
rename auth and start work separating config
This commit is contained in:
parent
deac897037
commit
d3bfac20a0
15 changed files with 153 additions and 120 deletions
|
@ -8,12 +8,12 @@ import {
|
|||
import db from "@server/db";
|
||||
import { eq, and } from "drizzle-orm";
|
||||
import config from "@server/config";
|
||||
import { extractBaseDomain } from "@server/utils/extractBaseDomain";
|
||||
|
||||
export const SESSION_COOKIE_NAME = "resource_session";
|
||||
export const SESSION_COOKIE_EXPIRES = 1000 * 60 * 60 * 24 * 30;
|
||||
export const SECURE_COOKIES = config.server.secure_cookies;
|
||||
export const COOKIE_DOMAIN =
|
||||
"." + new URL(config.app.base_url).hostname.split(".").slice(-2).join(".");
|
||||
export const COOKIE_DOMAIN = "." + extractBaseDomain(config.app.base_url);
|
||||
|
||||
export async function createResourceSession(opts: {
|
||||
token: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue