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. Creative Wordpress Website Design - Best Web Design Company @ 499sgdAuthor: James
2. Wix Web Development @ Exiga Software Solutions Pte. Ltd
Author: James
3. Best Ecommerce Website Design Company Singapore
Author: James
4. Responsive Web Design @ Rm499 Unlimited Pages
Author: James
5. Affordable Budget Website Design @ Rm499 Unlimited Pages In Malaysia
Author: James
6. Leading Website Builder At Just Rm499 Unlimited Pages
Author: James
7. Social Media Platforms & Their Evolving Role In Search Engine Marketing (sem) In 2028
Author: Sochtek
8. Why The Philippines Is Accelerating Toward Smarter P2p Crypto Exchange Solutions
Author: claraathena
9. Web Design Training: Start Your Career In Ahmedabad
Author: TCCI - Tririd Computer Coaching Institute
10. Website Development Canada: The 2025 Survival Guide For Serious Businesses
Author: It Master
11. Expert Seo Services: How They Boost Conversions, Credibility & Revenue
Author: JB Web Design
12. Why Web Seo Expert Is The #1 Choice For Seo And Digital Marketing In India (2025 Guide)
Author: webseoexpert
13. Social Media Marketing And Website Optimization: How Bhadrak Agencies Drive Customer Engagement
Author: Ethan Davis
14. Cost-effective Website Design And Digital Marketing Packages For Balasore Startups
Author: Ethan Davis
15. Website Design Trends For Bhubaneswar Businesses: Insights From Leading Web Development Experts
Author: Ethan Davis






