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. Professional Ecommerce Website Designers Can Work Wonders For Your Business!Author: Liam Mackie
2. How To Hire Mobile App Developer A Definitive Guide?
Author: brainbell10
3. Mobile-first Strategies For Modern Adult Website Development
Author: Cloudy Bites
4. Web Design Bristol For Growing Local Businesses
Author: seobristolcompany
5. Digital Marketing Bristol Strategies For Growing Local Businesses
Author: rafay
6. How To Pick A Reliable Aws App Development Services Agency In India
Author: Arun Singh
7. Web Designing Company In Mohali: 5 Business Situations That Show You Need A Better Website | Solutions1313
Author: Manjit Singh
8. How Ai Is Transforming Web Application User Experience And Business Conversions
Author: Proses India
9. A Guide To Web Backend Development Company India
Author: Rahul
10. Best Wordpress Plugins For Faster Websites 2026
Author: Jubayer
11. Best It Company In Dehradun: Powering A Smarter Digital Future
Author: Tejomaya Oneway Innovation LLP
12. Why Patna Brands Need Smarter Seo, Social Media And Google Ads
Author: Finder21 Technology
13. How To Build An Effective Social Media Strategy For Business Growth
Author: LiveBits Team
14. Transforming Businesses With Mobile App Design, Branding And Ai Automation Solutions In Hyderabad
Author: weblinksolutions
15. Choosing The Right Web And Mobile App Development Partner In Hyderabad
Author: weblinksolutions






