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. Top Benefits Of Choosing An Indian Website Redesign Company For Ai-based Ux OptimizationAuthor: Sanjeevani Nair
2. From Page 6 To Page 1: Real Seo Results That Show The Power Of Strategic Optimization | Sochtek
Author: sochtek
3. The Role Of Live Cricket Data Apis In Modern Sports Applications
Author: Cricket champion
4. Scrape Used Car Listings In Tokyo And Osaka
Author: Acto23
5. Aeo Vs Seo: Why Answer Engine Optimization Is The Future Of Search In The Ai Era | Tricity
Author: sochtek
6. Common Mistakes When You Convert Figma Design To Shopify Theme
Author: Ayaz Sayed
7. Essential Features Every Successful Ecommerce Website Must Have
Author: Rudram Technology Solutions
8. How Local Seo Helps Tricity Businesses Get More Customers
Author: sochtek
9. Ios App Development In Dubai: Powering Innovation In The Mobile First Economy
Author: SanjuSeo
10. Why Should You Choose The Best Ecommerce Website Designing Company In Bhubaneswar?
Author: Algopage IT Solutions Pvt Ltd
11. Ecommerce Website Design: Building The Foundation Of Your Company’s Digital Success Story!
Author: Liam Mackie
12. Custom Web Design And Development Company In Jaipur
Author: STPL
13. Top Website Development Company In Aerocity Mohali | Sochtek
Author: sochtek
14. Fix Slow Websites And Common Technical Problems
Author: Mohammed Yusri
15. Strapi & Headless Forms: Streamlining Lead Capture & Registrations
Author: Andy






