Repository navigation
build(deploy): mark the sign-in widget's /api/v1 flow writes for BotID on previews - #2995
Conversation
…D on previews BotID's client protected /cloud/zitadel/flow and its submit, but since #2359 the widget calls /cloud/zitadel/api/v1/flow. Its flow writes went unmarked, so the functions' checkBotId() refused every person signing in on a preview with auth.bot_suspected. The deployment suites pass the check through the protection bypass and never noticed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟢 Approval recommended
The review notes a narrowly scoped change that updates the BotID protected route list to exactly match the sign-in widget’s current /cloud/zitadel/api/v1/flow write endpoints, addressing the documented preview sign-in 403 issue without any remaining concerns raised.
No open issues 🎉
What changed in this PR
Fixes cloud preview sign-in failures where Vercel BotID didn’t mark the sign-in widget’s /api/v1 Flow write requests, leading to 403 auth.bot_suspected.
Changes:
- Update BotID protected paths to match
/cloud/zitadel/api/v1/flowand/cloud/zitadel/api/v1/flow/*/submit. - Add/adjust inline documentation explaining why the protected paths must match the widget’s requests exactly.
| File | Description |
|---|---|
| apps/cloud-console/src/bot-check.ts | Updates the BotID client’s protected route list to cover the widget’s current /cloud/zitadel/api/v1 Flow write endpoints so preview sign-ins aren’t incorrectly rejected. |
Review effort: Balanced
Context
cloud-git-console-invitations-zitadel.vercel.app/console/login) fails with403 auth.bot_suspected, "This browser could not be verified. Try again."Summary
apps/cloud-console/src/bot-check.tsprotectedPOST /cloud/zitadel/flowand/cloud/zitadel/flow/*/submit. Since feat!: call the API under /api/v1 #2359 the sign-in widget puts/api/v1after its base, so it calls/cloud/zitadel/api/v1/flow. BotID never attached its token to those calls. The functions' relay still runscheckBotId()on them (isFlowWriteaccepts both spellings), and Vercel answers "bot" for an unmarked request, so the relay refused every person who signed in on a preview./cloud/zitadel/api/v1/flowand/cloud/zitadel/api/v1/flow/*/submit, the two writes the relay checks.vercel logs, projectcloud, 2026-10-28 to now):Possible misconfiguration of Vercel BotId … path: '/cloud/zitadel/api/v1/flow'.x-vercel-protection-bypass. That is why CI never caught this, and why the curl in build(deploy): forward only the API's paths through the cloud's sign-in relay #2914's notes passed.Validation
pnpm run typecheck,pnpm run lintandpnpm run testinapps/cloud-consoleall pass (18 tests).cloud-git-claude-botid-api-v1-paths-zitadel.vercel.app/console/login), in the Claude desktop app's browser, without the bypass header: BotID's challenge script loaded (200),POST /cloud/zitadel/api/v1/flow→ 201, and submitting the email step (…/flow/flow_…/submit) → 200. The widget moved on to its next step. The function logs have no BotID misconfiguration line for this deployment.cloud-git-console-invitations-zitadel.vercel.app/console/login(main's paths) still shows "This browser could not be verified. Try again."Release notes / changeset
@zitadel/cloud-consoleis in the changesetsignorelist. Production's console does not route sign-in through the relay (signInApiBaseis set only off production), so nothing that ships changes.Notes
bot-check.tsthere; take feat!: protect password signup with built-in proof of work #2626's version.🤖 Generated with Claude Code