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. Web Development Agency In Gurgaon With Creative Ui/ux ExpertiseAuthor: WebSenor
2. Seo Friendly Custom Website Development Company
Author: other
3. Cloud-based Adult Website Design For High-traffic Platforms
Author: Cloudy Bites
4. Expert Shopify Website Development And Cbd Seo Services Helping Brands Build Stronger Online Market Presence
Author: Hazel Killer
5. Why Businesses Choose Microsoft Dynamics 365 Finance By Key Dynamics Solutions?
Author: Key Dynamics Solutions
6. Seo Company In India Helping Businesses Grow Online
Author: Ethan Davis
7. How To Build An Effective Qa Team?
Author: brainbell10
8. How White Label Wordpress Development Solves Agency Workload Issues
Author: Technocrackers
9. Coaches And Therapists Have The Same Website Problem
Author: Samantha
10. How Ai Automation Features Reduce Risks In Defi Trading
Author: avery
11. How Binance Clone Script Improves Multi Device Trading Experience
Author: avery
12. How User Experience (ux) Impacts Website Performance And Engagement
Author: Power Marketing international (web-seo1)
13. The 2026 Strategic Blueprint: Architecting Authority In The Synthesis Economy
Author: Smartfish Designs
14. It Staff Augmentation In India: Benefits, Companies & Trends
Author: bharathi
15. Different Types Of Ssl Certificates For Your Business
Author: VPS9






