mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-17 11:20:37 +09:00
fix: remove hardcoded JWT secret fallback from createBetterAuthInstance
This commit is contained in:
parent
316790ea0a
commit
b7a7dacfa3
3 changed files with 8 additions and 8 deletions
|
|
@ -475,13 +475,6 @@ export async function startServer(): Promise<StartedServer> {
|
|||
resolveBetterAuthSession,
|
||||
resolveBetterAuthSessionFromHeaders,
|
||||
} = await import("./auth/better-auth.js");
|
||||
const betterAuthSecret =
|
||||
process.env.BETTER_AUTH_SECRET?.trim() ?? process.env.PAPERCLIP_AGENT_JWT_SECRET?.trim();
|
||||
if (!betterAuthSecret) {
|
||||
throw new Error(
|
||||
"authenticated mode requires BETTER_AUTH_SECRET (or PAPERCLIP_AGENT_JWT_SECRET) to be set",
|
||||
);
|
||||
}
|
||||
const derivedTrustedOrigins = deriveAuthTrustedOrigins(config);
|
||||
const envTrustedOrigins = (process.env.BETTER_AUTH_TRUSTED_ORIGINS ?? "")
|
||||
.split(",")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue