Repository navigation
fix(auth): require bot secret for Telegram bot token exchange - #144
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BODMAT
approved these changes
Oct 1, 2026
This branch was successfully deployed
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.
What
Require a shared
BOT_API_SECRET(X-Bot-Secretheader) for the bot source of/auth/telegram/exchange; untrack generatedapps/web/next-env.d.ts.Why
The bot exchange issued tokens for a bare
telegramIdwith no proof of the caller - it must only be reachable by our bot. Missingsourcenow returns 400 instead of defaulting tobot.next-env.d.tsis regenerated by Next on every dev/build run and kept showing up as a change;check-typesnow runsnext typegenfirst so it still passes on a clean clone.Deploy: set
BOT_API_SECRET(same value) in Render and in~/bot.envon the VM before merging - api and bot refuse to boot without it.Testing
New auth integration cases (no header, wrong header, missing source, valid secret);
pnpm check,pnpm check-types,test:api:light,test:botpass. Webcheck-typesverified withoutnext-env.d.tsand.next.