Skip to content

Fix Client Public routes #61

Description

@christianhelp

From CodeRabbit in apps/web/src/lib/functions/auth.ts:
⚠️ Potential issue | 🟡 Minor

isPublicRoute uses exact string match — pathname variants won't be recognized as public.

PUBLIC_ROUTES.includes(pathname) requires a character-perfect match. If pathname ever arrives with a trailing slash (e.g., /sign-in/) or query string appended, it will return false, treating a public page as protected. Consider normalizing before the check or using startsWith for path-prefix matching.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ClientAnything related to the frontend React code

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions