Skip to content

Fix Client Public routes #61

@christianhelp

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.

Metadata

Metadata

Assignees

Labels

ClientAnything related to the frontend React code

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions