fix(auth): isolate session cookies from other Auth.js apps on same host (#5996)
Prefix all Auth.js cookies (default "homarr") so they no longer collide with other Auth.js apps on the same hostname.
This commit is contained in:
1 parent
bf4396917e
commit
e1a245ff2d
5 files changed
+30
-7
No files matched your search
@@ -28,6 +28,11 @@ export const env = createEnv({
|
||||
AUTH_LOGOUT_REDIRECT_URL: z.string().url().optional(),
|
||||
AUTH_SESSION_EXPIRY_TIME: createDurationSchema("30d"),
|
||||
AUTH_PROVIDERS: authProvidersSchema,
|
||||
AUTH_COOKIE_PREFIX: z
|
||||
.string()
|
||||
.min(1)
|
||||
.regex(/^[a-zA-Z0-9-_]+$/, "AUTH_COOKIE_PREFIX must only contain letters, numbers, hyphens and underscores")
|
||||
.default("homarr"),
|
||||
...(authProviders.includes("oidc")
|
||||
? {
|
||||
AUTH_OIDC_ISSUER: z.string().url(),
|
||||
|
||||
Reference in new issue
Block a user