Separating Identity and Delivery Channels for Compliant Telegram Mini App Authentication
When configuring authorization in Telegram Mini Apps, the initial flow appears straightforward: Telegram supplies initData, the server validates the HMAC-SHA-256 signature derived from the bot token, and everything works out of the box. However, services aimed at Russian users must also satisfy stricter identification requirements, prompting the team to keep Telegram primarily as a delivery channel rather than the sole login method.
The architecture explicitly separates two concepts: “who the user is” (identity) and “where to send notifications” (channel identity). Users authenticate via VK ID, Yandex ID or MAX, after which their telegram_id is linked to the account solely for message delivery. The database schema reflects this split with separate tables storing max_user_id, vk_user_id, yandex_id for identity and max_chat_id, vk_chat_id, telegram_id for delivery channels.
Three buttons labeled MAX, VK and Yandex appear inside the mini-app; no “Login with Telegram” option exists. For VK ID the team uses OAuth 2.1 with PKCE: the browser generates a code_verifier, computes the S256 code_challenge, and includes both state and challenge in the authorization request. The server stores the verifier keyed by state for later validation.
Authorization opens in a new browser tab, allowing users to complete the flow in their main browser even when the mini-app runs inside Telegram WebView or on another device. After success the tab closes itself and the main interface learns the outcome via polling. The same pattern was applied to smart-home authorization through Home Assistant.
Yandex authentication follows a similar OAuth 2.0 flow, but the authorization URL is generated on the backend. The server exchanges the received code for an access token, retrieves the user identifier, and returns the result via a /api/auth/result-by-state endpoint that clients poll (for example, 120 attempts at three-second intervals). Only a short-lived application-level code travels to the browser; the OAuth token itself never reaches client JavaScript and is instead stored in an HttpOnly cookie, reducing XSS exposure.
State values are generated with crypto.randomUUID() or crypto.getRandomValues() providing at least 128 bits of entropy and are stored server-side with a short TTL. The callback avoids placing any auth_token in the URL; a one-time code is exchanged for a session via POST. A from_extension flag is passed only for UI adjustments and carries no security meaning on the server.
MAX integration uses a deep link containing a single-use token; after binding, the bot posts a confirmation message in the chat. Consent handling differs by platform: Telegram WebApp versions display two checkboxes (general consent and separate consent for data transfer to Telegram) to meet legal requirements, while the PWA version requires only one checkbox.
The resulting system powers the project “My Anti-Social Network,” an ad-free news aggregator that includes bots in Telegram, MAX and VK, a PWA, browser extensions, mobile apps and integrations with smart-home and voice assistants. The developer notes that while the technical pattern supports compliance, final legal validity depends on specific regulatory interpretation.
Related articles
Peter Levashov Accused of FBI Collaboration and Running XSS Honeypot Forum After Kelihos Sentence
Russian spammer and botnet operator Petr Levashov, known online as Petr Severa, was arrested in Barcelona in 2017 and later pleaded guilty to running the Storm, Waledac and Kelihos botnets. He received a lenient sentence of under three years despite prosecutors seeking 14.5 years, which experts attribute to possible cooperation with the FBI. After release, Levashov remained in the United States while remaining wanted in Russia. Forum users bratva and stallman on XSS.mx and Exploit.in have been linked to Levashov through stylistic analysis and shared references to the Telegram channel Dark News admin nicknamed golub. Stallman, identified as the final administrator of the RAMP4u forum, openly purchased access to U.S. critical infrastructure including power grids, water systems and hospitals while moderators allegedly suppressed competing posts. Observers including researcher Olga Kuprina suggest these accounts operated under agreements with U.S. authorities, allowing forums to function as intelligence-gathering platforms rather than purely criminal marketplaces.
Russian Cybersecurity Market Set to Hit 455 Billion Rubles by 2026 as Talent Shortage Persists
MWS Cloud forecasts that the Russian information security market will grow 20.8 percent to reach 455.4 billion rubles in 2026. The largest segment will be software at 216.5 billion rubles, followed by services at 167 billion and hardware at 71.9 billion rubles. Demand is increasingly driven by sophisticated attacks, regulatory requirements and fines rather than import substitution alone. BI.ZONE offers a more conservative estimate of 10-15 percent annual growth. Managed security services such as monitoring, incident response and vulnerability management are leading the services segment because few organizations can maintain 24/7 in-house teams. Director Artem Gribkov of Angara MTDR estimates the personnel deficit at approximately 40 percent, especially at middle and senior levels.
Russian Internet Users Report Growing Access Restrictions as Certificate Revocations Affect 39 Percent of Respondents
A recent telephone survey conducted by Russian Field between September 23 and 30, 2026, among 1,600 participants representative by gender, age, federal districts, and settlement types shows that 39 percent of Russian internet users have noticed restrictions or complications when trying to access websites. When sites fail to open due to certificate problems, 26 percent of respondents said they would simply stop visiting the resource. The findings, published by Kod.ru, also indicate that 57 percent of users are aware that Russian websites may not load in certain browsers because of revoked foreign certificates. In response to certificate errors, 55 percent would switch browsers, 22 percent would install the required certificates, and 21 percent would try accessing the site from a mobile device. Younger users are more inclined to use VPNs or proxies, while older respondents more often choose to abandon the site. Overall, 77 percent of those surveyed expect further changes to the Russian internet segment, with only 9 percent believing it will remain unchanged.
CISA and NSA Urge Shift to Memory-Safe Languages Like Rust to Eliminate Memory Vulnerabilities
Official reports from CISA, NSA, FBI and partners highlight that decades of safe coding practices and code analysis tools have failed to resolve memory safety issues in languages such as C and C++. Government documents cite statistics showing that 70-75% of exploited vulnerabilities and zero-days stem from memory errors, including data from Microsoft, Google Chromium, Mozilla and Project Zero. Google reports that Rust adoption in Android reduced memory-related vulnerabilities below 20% in 2025, with a 1000-fold lower vulnerability density compared to C++. The analysis details Rust's ownership, borrowing and move semantics that provide compile-time guarantees unavailable in C++, enabling stronger compiler optimizations. Reports also acknowledge migration challenges including learning curves, interop issues and ecosystem gaps, while noting ongoing C++ safety improvements targeted for C++26 and C++29. Major organizations including Microsoft, Amazon and Google are already committing to Rust for critical new code.