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. Vital Design Elements That Forge Brand Identity - Msm CoretechAuthor: msmcoretech
2. Start Loan Lending App Development
Author: davidbeckam
3. 10 Secrets Every Successful Website Development Company Knows That You Don’t!
Author: Prakar Abhishek
4. Mobile App Development In Chennai: Trends, Challenges, And Opportunities
Author: Blazedream Technologies Pvt Ltd
5. Eligibility Criteria For The Madani 2025 Msme Grant
Author: Lukas
6. How To Successfully Reinforce Your Brand Through Digital Marketing?
Author: welovetravelusa
7. What’s New In React Native?
Author: GrapesTech Solutions
8. The Future Of Augmented Reality In Retail & E-commerce Industry
Author: Manoj Singh
9. How To Build A Scalable Ai Agent Solution That Grows With Your Business
Author: Luna Jenkins
10. Affordable Website Development Solutions For Small Businesses In 2025
Author: sarah
11. How To Drive Successful Copilot Adoption And Maximize Its Benefits
Author: ECF Data
12. Top Traits Of Leading Design Companies In San Diego
Author: Storm Brain
13. The Psychology Behind Clicks: How Consumer Behaviour Shapes Digital Strategy
Author: OneData Software Solutions
14. What Is Etrade Programme 2.0? A Complete Guide For Malaysian Smes
Author: James Franklin
15. Why Choosing A Ny Web Design Agency Like Captivate Designs Is A Smart Business Move
Author: Captivate Designs