Some checks are pending
E2E / Playwright e2e (push) Waiting to run
- 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.
18 lines
768 B
TypeScript
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/")
|
|
}
|