Skip to content

build(deploy): mark the sign-in widget's /api/v1 flow writes for BotID on previews - #2995

Merged
fforootd merged 1 commit into
mainfrom
claude/botid-api-v1-paths
Nov 11, 2026
Merged

fforootd merged 1 commit into
mainfrom
claude/botid-api-v1-paths

Conversation

@fforootd

@fforootd fforootd commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Context

  • No issue. Reported in Slack: signing in on a cloud preview (for example cloud-git-console-invitations-zitadel.vercel.app/console/login) fails with 403 auth.bot_suspected, "This browser could not be verified. Try again."

Summary

  • BotID's client marked paths the widget no longer calls. apps/cloud-console/src/bot-check.ts protected POST /cloud/zitadel/flow and /cloud/zitadel/flow/*/submit. Since feat!: call the API under /api/v1 #2359 the sign-in widget puts /api/v1 after its base, so it calls /cloud/zitadel/api/v1/flow. BotID never attached its token to those calls. The functions' relay still runs checkBotId() on them (isFlowWrite accepts both spellings), and Vercel answers "bot" for an unmarked request, so the relay refused every person who signed in on a preview.
  • It now protects /cloud/zitadel/api/v1/flow and /cloud/zitadel/api/v1/flow/*/submit, the two writes the relay checks.
  • What the logs show (vercel logs, project cloud, 2026-10-28 to now):

Validation

  • pnpm run typecheck, pnpm run lint and pnpm run test in apps/cloud-console all pass (18 tests).
  • On this PR's preview (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.
  • Control, same browser, a minute apart: 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

  • No changeset required: @zitadel/cloud-console is in the changesets ignore list. Production's console does not route sign-in through the relay (signInApiBase is set only off production), so nothing that ships changes.

Notes

🤖 Generated with Claude Code

…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>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 15:54
@vercel

vercel Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cloud Ready Ready Preview Nov 11, 2026 3:57pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-11T15:58:05.787731Z c0a1643 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ No Changeset found

Latest commit: c0a1643

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/flow and /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

@fforootd
fforootd added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 2eecd51 Nov 11, 2026
28 checks passed
@fforootd
fforootd deleted the claude/botid-api-v1-paths branch November 11, 2026 16:04
@github-project-automation github-project-automation Bot moved this from Inbox to Done in Engineering Kanban Nov 11, 2026

This branch was successfully deployed

1 active deployment
Preview — c0a16437 Deployed Nov 11, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants