-
Notifications
You must be signed in to change notification settings - Fork 34
Improve: sign up verification #160
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?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
bugbot run |
| } | ||
|
|
||
| export default config | ||
| const exportedConfig = process.env.NEXT_PUBLIC_USE_BOT_ID === '1' ? withBotId(config) : config |
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.
Bug: Bot Detection Inconsistency Across Build and Runtime
The NEXT_PUBLIC_USE_BOT_ID environment variable controls bot detection, but it's evaluated at build time in next.config.mjs for the withBotId wrapper and at runtime in src/configs/flags.ts. This difference can cause inconsistent bot detection behavior if the variable's value isn't consistent between build and runtime.
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.
i am aware of this inconsistency, this HOF only configures certain rewrites to make it more effective in production
Note
Adds BotId integration for bot detection on sign-up, gated by
NEXT_PUBLIC_USE_BOT_ID, with client/server hooks and conditional Next.js config.botiddependency and feature flagUSE_BOT_ID(NEXT_PUBLIC_USE_BOT_ID).src/instrumentation-client.tscallsinitBotIdwith protectedPOST /sign-upwhen enabled.signUpActioninsrc/server/auth/auth-actions.tsrunscheckBotId()and blocks suspected bots.withBotIdwhen flag is on.z.enum(['google','github'])insignInWithOAuthAction.Written by Cursor Bugbot for commit 4302e39. This will update automatically on new commits. Configure here.