@use-telegram-auth/client
v1.0.5
Published
Core client-side functionality of authenticating users with Telegram without the login widget
Downloads
531
Maintainers
Readme
@use-telegram-auth/client
Perform Telegram user authentication without using the Telegram login widget
Installation
npm i @use-telegram-auth/client
Usage
Using default options:
import telegramAuth from "@use-telegram-auth/client";
const BOT_ID = "123";
const result = await telegramAuth(BOT_ID);
// Validate the result on server-side!
Tweaking some options:
import telegramAuth from "@use-telegram-auth/client";
const BOT_ID = "123";
const result = await telegramAuth(BOT_ID, { windowFeatures: { popup: true } });
// Validate the result on server-side!