ultisuite-client/lib/auth/public-paths.ts
R3D347HR4Y de5b5a60ef
Some checks are pending
E2E / Playwright e2e (push) Waiting to run
feat: enhance authentication and password reset flows with new components and layout
- Replaced LoginForm with LoginPageContent for improved login handling and user experience.
- Introduced ResetPasswordPage and ResetPasswordLayout components to facilitate password reset functionality.
- Added new flow stages for authentication, including PasswordStage and SourceOAuthStage, to streamline user interactions.
- Updated FlowChallengeForm to integrate new stages and improve error handling during authentication processes.
- Refactored existing components to support the new authentication flow structure, enhancing maintainability and user experience.
2026-06-20 01:09:30 +02:00

18 lines
787 B
TypeScript

const AUTH_PUBLIC_PREFIXES = ["/login", "/signup", "/forgot-password", "/reset-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/")
}