build(deps): switch to pnpm package manager#40
Conversation
JStaRFilms
commented
Dec 14, 2025
- Remove package-lock.json
- Add pnpm-lock.yaml
- Add src/middleware.ts
- Remove package-lock.json - Add pnpm-lock.yaml - Add src/middleware.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🟢 J Star Code Audit
📄 src/middleware.tsWarning Missing WORKOS Redirect URI Validation 🛠️ Recommended Fixes
Powered by J Star Sentinel ⚡ |
Previously, the middleware used a fallback localhost URL if the environment variable was unset, which could lead to incorrect redirects in production. This change enforces the requirement, throwing an error if not provided.
🟢 J Star Code Audit
📄 src/middleware.tsCaution Missing WORKOS_REDIRECT_URI validation in middleware 🔹 Middleware applies WorkOS auth to all routesCategory: MAINTAINABILITY The matcher pattern catches every route except static assets, so public pages like /about or /portfolio will force authentication. Restrict the matcher to only admin or protected routes to avoid blocking public content. 🛠️ Recommended Fixes
Powered by J Star Sentinel ⚡ |
…onment Modify middleware to check for WORKOS_REDIRECT_URI at runtime, bypassing authentication with a warning log if unset. This adjustment supports deployments without mandatory auth setup, while preserving full functionality when configured. Also updates matcher comments for clarity on route coverage.
🟢 J Star Code Audit
📄 src/middleware.tsWarning WorkOS middleware bypass on mis-configuration 🔹 Console.warn on every requestCategory: PERFORMANCE The warning is printed for every incoming request when WorkOS is not configured, flooding logs and adding unnecessary overhead. 🔧 Matcher comment is outdatedCategory: MAINTAINABILITY The comment claims the matcher covers ALL routes, but admin routes protected by withAuth() are not handled here, creating confusion. 🛠️ Recommended Fixes
Powered by J Star Sentinel ⚡ |
|
/review |
🟢 J Star Code Audit
📄 src/middleware.tsWarning Environment Variable Read at Module Load 🔹 Silent Auth Bypass on Missing ConfigCategory: LOGIC When WORKOS_REDIRECT_URI is missing the middleware silently allows all traffic, which masks misconfiguration and could leave admin routes unprotected. 🔧 Comment Claims RootLayout Uses withAuthCategory: MAINTAINABILITY The comment says RootLayout uses withAuth but this middleware doesn't enforce login, creating confusion about which layer handles protection. 🛠️ Recommended Fixes
Powered by J Star Sentinel ⚡ |