
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
@telegram-auth/server
Advanced tools
Zero dependency package to validate data received from Telegram Login Widget
Zero dependency package to validate the data received from Telegram Login Widget or Web App, compatible with Node, serverless edge networks and web workers.
@telegram-auth/server
exports a TS/JS class (AuthDataValidator
) to validate the data received from Telegram Login Widget and Telegram Web Apps.
It also exports some utility functions to prepare the data for validation.
# npm
npm install @telegram-auth/server
# yarn
yarn add @telegram-auth/server
# with pnpm
pnpm add @telegram-auth/server
import { AuthDataValidator } from '@telegram-auth/server';
import { urlStrToAuthDataMap } from '@telegram-auth/server/utils';
// initialize the validator with your bot token
const validator = new AuthDataValidator({ botToken: process.env.BOT_TOKEN });
// convert the data from the URL to a map
const data = urlStrToAuthDataMap(request.url);
try {
// validate the data by passing the map to the validator
const user = await validator.validate(data);
// The data is now valid and you can sign in the user.
console.log(user);
} catch (error) {
console.error(error);
}
FAQs
Zero dependency package to validate data received from Telegram Login Widget
The npm package @telegram-auth/server receives a total of 2,420 weekly downloads. As such, @telegram-auth/server popularity was classified as popular.
We found that @telegram-auth/server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.