vue3-telegram-login

Vue 3 component for Telegram Login Widget (`telegram-widget.js?22`).
12,191 22
Install
npm install vue3-telegram-login
Latest Version:1.2.0
Vue:3
License:MIT
Last Updated:Jul 9, 2026
Links: GitHub  ·  npm
Maintainer: cinob

Vue3 Telegram Login

Vue 3 component for Telegram Login Widget (telegram-widget.js?22).

Installation

pnpm add vue3-telegram-login

Usage

Callback mode

<script setup>
import { telegramLoginTemp } from 'vue3-telegram-login'

function handleCallback(user) {
  console.log(user)
}
</script>

<template>
  <telegram-login-temp
    mode="callback"
    telegram-login="YourTelegramBot"
    @callback="handleCallback"
  />
</template>

Redirect mode

<script setup>
import { telegramLoginTemp } from 'vue3-telegram-login'
</script>

<template>
  <telegram-login-temp
    mode="redirect"
    telegram-login="YourTelegramBot"
    redirect-url="https://your-domain.com/auth/telegram/callback"
  />
</template>

Props

Prop Type Default Description
mode 'callback' | 'redirect' - Login mode.
telegramLogin string - Telegram bot username, must end with bot.
redirectUrl string '' Redirect URL for redirect mode.
requestAccess 'read' | 'write' 'read' Use write to request permission to send messages.
size 'small' | 'medium' | 'large' 'large' Button size.
userpic boolean true Show user photo.
radius string '' Button corner radius.

Events

Event Description
loaded Telegram widget script loaded.
callback Login success callback, only for callback mode.

Notes

  • Set your bot domain with @BotFather using /setdomain.
  • Always verify the received payload on your server. See Checking authorization.
  • This package wraps the legacy Telegram Login Widget. New OAuth-style flows require a different integration.

Related Packages

vue-tg

Telegram integration for Vue

81,318 280
@webx-ui/module-notifications

Notification channels for the WebX UI admin panel: Telegram and e-mail, Mustache...

727 0
vue-wave-player

Vue 3 audio player component with Telegram-style waveform visualization

5,336 18
@twallpaper/vue

🌈 Multicolor gradient wallpaper created algorithmically and shimmers smoothly.

549 117
@mxerf/tappt

Tiny, SSR-safe haptic feedback for the web. Works in Telegram Mini Apps, iOS Saf...

1,487 0

Version History

Version Released Vue License
1.2.0 ^3.4.21 MIT
1.1.0 ^3.4.21 MIT
0.0.5 ^3.4.21 MIT
0.0.4 ^3.0.5 MIT
0.0.3 ^3.0.5