ultisuite-client/lib/auth/public-paths.ts
R3D347HR4Y 359931c2f3
Some checks are pending
E2E / Playwright e2e (push) Waiting to run
feat: implement forgot password and signup flows with new layouts and components
- Added new layout and page components for forgot password and signup functionalities, enhancing user experience.
- Integrated authentication flow handling for password recovery and account creation, utilizing dynamic metadata.
- Updated login form to include links for forgot password and signup, improving navigation between authentication states.
- Refactored CSS styles for login components to ensure consistent design across different authentication pages.
2026-06-19 22:34:23 +02:00

18 lines
768 B
TypeScript

const AUTH_PUBLIC_PREFIXES = ["/login", "/signup", "/forgot-password", "/auth/", "/api/auth/"]
/** Routes without session enforcement (login, public shares, interactive demos). */
export function isAuthPublicPath(pathname: string): boolean {
if (pathname === "/") return true
if (pathname === "/suite" || pathname.startsWith("/suite/")) return true
if (pathname.startsWith("/drive/s/")) return true
if (pathname === "/demo" || pathname.startsWith("/demo/")) return true
if (pathname.startsWith("/onboard/")) return true
return AUTH_PUBLIC_PREFIXES.some(
(prefix) => pathname === prefix || pathname.startsWith(prefix)
)
}
export function isDemoPublicPath(pathname: string): boolean {
return pathname === "/demo" || pathname.startsWith("/demo/")
}