fix: login loading overlay, deduplicate getCookieDomain (F-18, F-11)

- Login page shows LoadingOverlay during redirect instead of blank screen
- Extract getCookieDomain() to shared lib/utils/cookies.ts
This commit is contained in:
Usman Baig
2026-03-01 21:02:28 +01:00
parent dfa887147a
commit b7426d6128
5 changed files with 24 additions and 19 deletions

9
lib/utils/cookies.ts Normal file
View File

@@ -0,0 +1,9 @@
// * Determine cookie domain dynamically.
// * In production (on ciphera.net), we share cookies across subdomains.
// * In local dev (localhost), we don't set a domain.
export const getCookieDomain = (): string | undefined => {
if (process.env.NODE_ENV === 'production') {
return '.ciphera.net'
}
return undefined
}