Habr•August 19, 2026•🇷🇺Translated from Russian

Compliant Telegram Mini App Authentication via Russian ID Providers in My Anti-Social Network Project

The project My Anti-Social Network shows how to implement legally compliant entry into Telegram Mini Apps for Russian audiences by moving identity verification away from Telegram itself. While Telegram’s initData HMAC-SHA-256 signature check remains reliable, Russian regulatory demands for user identification require additional steps when the service targets domestic users.

The core design separates identity (who the user is) from channel identity (where notifications are delivered). Users authenticate via VK ID, Yandex ID, or MAX; the resulting telegram_id is stored only as a delivery channel, never as the primary login credential.

VK ID Flow with PKCE

For VK ID the application follows OAuth 2.1 with PKCE. The browser generates a code_verifier, derives a code_challenge using S256, and stores the verifier on the server under a cryptographically random state value. The authorization URL opens in a new tab so users can complete login even when the Mini App runs inside Telegram WebView or on another device.

Yandex ID and MAX Integration

Yandex ID uses a similar OAuth 2.0 redirect that returns a short-lived code exchanged server-side for an identifier. MAX authentication relies on a one-time deep-link token that the MAX bot confirms inside the chat. In all cases the final exchange endpoint issues an HttpOnly session cookie; OAuth tokens never become accessible to client-side JavaScript.

Security Controls

  • state values are generated with crypto.randomUUID() or equivalent 128-bit entropy and carry short TTLs.
  • Polling for authentication results uses up to 120 attempts with 3-second intervals.
  • Consent checkboxes for data processing are shown according to the platform (two checkboxes inside Telegram WebApp, one in PWA).

The same codebase powers Telegram bots, MAX and VK bots, PWA, browser extensions, and Home Assistant voice-assistant integrations with Alice, Sber, and Marusya. All state, code exchange, and polling logic remains invisible to the end user.

Related articles

Habr•Policy & Regulation

25-Year Mystery Solved: NIST Elliptic Curve Seeds Came from lrand48 and Unix Timestamps

Researchers at Anthropic used the Claude model to trace the origins of the mysterious seed values embedded in NIST elliptic curves standardized in FIPS 186-2. The seeds for curves including NIST P-192, P-224, P-256, P-384 and P-521 were not derived from hashed humorous phrases as previously rumored but instead generated by the non-cryptographic lrand48 linear congruential generator seeded with Unix timestamps from 1997 and 1998. The discovery also explains the base points of several curves using the FreeLIP library's random number generator. The findings reduce long-standing suspicions of deliberate backdoors inserted by the NSA. Several candidate curves that met the criteria were skipped during selection, leaving open questions about the exact filtering process. The work was performed by a team including Nicholas Carlini and others, with the reproduction code released into the public domain.

Security NEXT•Policy & Regulation

Japan's IPA Opens Special Consultation Desk for Suspected Cyberattack Data Leaks

The Information-technology Promotion Agency (IPA) has launched a dedicated Unauthorized Access Special Consultation Desk to assist companies and organizations affected by cyber attacks resulting in information leaks. The service accepts inquiries from entities that only suspect they may have been victimized, providing initial response guidance even before confirmed incidents. Consultations cover advice on whether unauthorized access or data exfiltration is likely, recommended immediate containment steps, lists of incident response vendors, and reporting obligations to relevant authorities. The hotline operates on weekdays from 9:30 to 17:30 excluding the lunch hour, while email replies may take until the next business day. Separate channels exist for non-access incidents, general security advice, and individual personal data breach concerns. The move responds to a rising number of breaches targeting online services handling personal information.

AntiMalware•Policy & Regulation

Russian State Duma Approves Outsourcing of Banking Secrecy and Client Data Without Consent

The State Duma has passed legislation in its second and third readings permitting Russian banks to transfer client data processing, including banking secrecy and personal information, to external IT contractors and cloud providers. No separate client consent will be required for such transfers. Only accredited Russian IT companies and banks holding a universal license that meet strict domestic control criteria may act as processors, with all servers required to remain inside Russia. Banks must notify the Central Bank of Russia in advance, and contractors must undergo audits by organizations licensed by FSTEC or FSB Russia. Special approval procedures involving the Central Bank, FSB, and Rosfinmonitoring apply to banks under foreign control. The law preserves banking secrecy while expanding the circle of authorized handlers under defined security obligations.

AntiMalware•Policy & Regulation

Russia's MinTsifry Drafts Security Requirements for Trusted Domestic Software

The Russian Ministry of Digital Development has published a draft set of requirements for trusted Russian software that go beyond simple domestic origin. The proposals focus on resilience against external interference, absence of known unpatched vulnerabilities, and full development and build processes conducted inside Russia under controlled conditions. Additional rules cover up-to-date component inventories, in-country technical support, and timely disclosure of software updates. Special compatibility mandates are included for Russian browsers and electronic signature tools across multiple product classes such as operating systems, databases, office suites, and communication applications. Compliance verification would be voluntary through expert review, with results recorded in the official Russian software registry and internal-use software lists.