A zero-dependency package for validating Telegram Login Widget data using Web Crypto API.
pnpm add telegram-login-widget
import { validate } from 'telegram-login-widget'
const botToken = 'YOUR BOT TOKEN'
const data = {
// Telegram Login Widget data
}
const isValid = await validate(botToken, data)
console.log(isValid)