JSPM

@use-telegram-auth/client

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 74
  • Score
    100M100P100Q74583F
  • License ISC

Core client-side functionality of authenticating users with Telegram without the login widget

Package Exports

  • @use-telegram-auth/client

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!