Draft
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
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.
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.
Member
Author
There was a problem hiding this comment.
i am aware of this inconsistency, this HOF only configures certain rewrites to make it more effective in production
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.