Back to Trending
RepositoryPython
swimmwatch

swimmwatch/telegram-webapp-auth

:lock: Python package that implements Telegram Mini Apps authentication algorithms.

100stars
10forks
1issues
1views

🔐 Xác thực Telegram Mini Apps trong Python

Thư viện telegram-webapp-auth cung cấp cách xác thực initData từ Telegram Mini Apps bằng Python.

telegram-webapp-auth là một gói thư viện Python giúp xác thực dữ liệu initData từ Telegram Mini Apps. Dự án triển khai chính thức các thuật toán xác thực của Telegram, hỗ trợ cả quy trình xác minh bằng bot token và xác minh bên thứ ba sử dụng Ed25519. Kết quả trả về là các đối tượng dataclass có kiểu rõ ràng cho người dùng, trò chuyện và dữ liệu init.

✨ Điểm nổi bật

  • Xác minh bằng bot token: Sử dụng TelegramAuthenticator.validate() để xác thực initData.
  • Xác minh Ed25519 bên thứ ba: Hỗ trợ TelegramAuthenticator.validate_third_party() cho xác minh không qua bot token.
  • Kiểm tra thời hạn tùy chọn: Cấu hình expr_in để kiểm tra thời gian hết hạn của initData.
  • Kết quả có kiểu rõ ràng: Trả về WebAppInitData, WebAppUser, WebAppChat dưới dạng dataclass.
  • Giữ lại trường không xác định: Các trường cấp độ không được biết đến vẫn được giữ lại.
  • Hỗ trợ Python 3.10+: Tận dụng tính năng ngôn ngữ hiện đại.
  • Phụ thuộc nhẹ: Ít phụ thuộc thời gian chạy.

💡 Vì sao đáng chú ý

Khác với cách xác thực thủ công phức tạp, telegram-webapp-auth đóng gói toàn bộ thuật toán xác thực của Telegram vào một gói thư viện sẵn sàng sử dụng. Phù hợp với các ứng dụng Mini Apps cần kiểm chứng danh tính người dùng một cách an toàn và nhanh chóng.


#Telegram #MiniApps #Python #Authentication #TiniX

Similar Projects

Discover other similar projects and AI models.

RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

375.7k
Sep 15, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

288.1k
Oct 26, 2026
RepositoryPython
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

187.7k
Oct 24, 2026
RepositoryPython
langgenius/dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

159.6k
Oct 26, 2026
Repository
CyC2018/CS-Notes

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

186.3k
Aug 21, 2024
RepositoryPython
eternnoir/pyTelegramBotAPI

Python Telegram bot api.

8.8k
Oct 20, 2026
RepositoryPython
vinta/awesome-python

The definitive list that answers "I want to do X in Python, which tool should I use?"

330.4k
Oct 26, 2026
RepositoryPython
TheAlgorithms/Python

All Algorithms implemented in Python

225.5k
Oct 20, 2026
RepositoryPython
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

202.5k
Oct 23, 2026