-
Notifications
You must be signed in to change notification settings - Fork 4
Allowed login bypass for local development #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Allowed login bypass for local development #48
Conversation
|
@lfgcampos is attempting to deploy a commit to the Sentry Team on Vercel. A member of the Team first needs to authorize it. |
|
makes sense - i had considered doing it but was being lazy. i think just make sure we dont have any bypasses (i agree w/ the cursor flag here - only needed in dev) |
sorry for the long time, that should now be fixed =) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
|
|
||
| // Redirect to home if auth is bypassed (local development) | ||
| const isAuthBypassed = | ||
| process.env.NODE_ENV !== 'production' && process.env.AUTH_BYPASS_LOCAL === 'true'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auth bypass check duplicated in three separate files
Low Severity
The isAuthBypassed expression (process.env.NODE_ENV !== 'production' && process.env.AUTH_BYPASS_LOCAL === 'true') is duplicated verbatim in three files: src/lib/auth.ts, src/proxy.ts, and src/app/sign-in/layout.tsx. If the bypass condition ever needs to change (e.g., adding an additional safety check), all three must be updated in lockstep — easy to miss. Extracting it into a small dependency-free module (e.g., src/lib/dev-config.ts) would let all three import the same value, including the Edge-runtime proxy.ts.


Should fix #45