ALL >> Web-Design >> View Article
Vue 3 Telegram Login
Installation
You've to run this command to install it with npm:
$ npm i vue3-telegram-login --save
Usage
Next, You've to Import telegram-login-temp, pass it to the component, and then you can utilize it in your template.
Loading...
import { telegramLoginTemp } from 'vue3-telegram-login'
import { ref } from 'vue'
const isLoaded = ref(false)
function telegramLoadedCallbackFunc () {
console.log('script is loaded')
isLoaded.value = true
}
function yourCallbackFunction (user) {
// gets user as an input
// id, first_name, last_name, username,
// photo_url, auth_date and hash
console.log(user)
}
Closing Notes
You need to set the domain to your bot if you want to use Telegram Login (/setdomain command to @BotFather)
You've to validate the authentication and the integrity of the data received by correlating the received hash parameter with the hexadecimal representation of the HMAC-SHA-256 signature of the data-check-string with the SHA256 hash of the bot's token utilized as a secret key (source).
You can observe some code samples on this page.
Don't disable third party cookies if you want to use Telegram Login as a User (thanks @robverhoef )
Add Comment
Web Design Articles
1. Revolutionizing Communication: The Whatsapp Clone By Omninos SolutionsAuthor: BY Omninos solution
2. Seo Vs Ppc: Which Brings Better Roi For Small Businesses In 2026?
Author: sochtek
3. Hire The Best Vue.js Developers In Riyadh For Your Applications
Author: Andy
4. What All You Need To Understand About Website Design And Development
Author: Liam Mackie
5. Drupal Web Development Services In Riyadh For Strategic Growth
Author: Andy
6. Landing Page Seo That Actually Converts Visitors Into Customers
Author: sochtek
7. Objective-c App Development & Services
Author: brainbell
8. Ios_sdk
Author: brainbell10
9. Ionic
Author: brainbell10
10. Iot App Development
Author: brainbell10
11. How Node.js Works: A Comprehensive Guide In 2026
Author: Andy
12. Why Your Website Gets Traffic But No Leads And How To Fix It
Author: sochtek
13. Transform Your Digital Presence With The Leading Website Design Company In Bhubaneswar
Author: Ethan Davis
14. Why Hiring A Website Designing Company Is Better Than Relying On Ai?
Author: Angus Carruthers
15. What Is Next.js Development? An Overview Of The Powerful React Framework
Author: Andy






