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. Why Hiring A Website Designing Company Is Better Than Relying On Ai?Author: Angus Carruthers
2. What Is Next.js Development? An Overview Of The Powerful React Framework
Author: Andy
3. Top 10 Website Development Companies In Delhi (2026 Guide)
Author: Prettify Creative
4. Easywebplans It Llc – A Results-driven Graphic Design Company In Dubai
Author: Easywebplans IT LLC
5. Microsoft Azure
Author: brainbell10
6. Easywebplans It Llc: The Best Digital Marketing Company In Dubai
Author: Divya Koundal
7. Ecommerce Website Development In Coimbatore
Author: webbitech
8. Website Development Company In Coimbatore
Author: webbitech
9. Why Businesses Are Investing In Advanced Web App Development Solutions
Author: elijah
10. How Small Businesses Can Compete With Big Brands Using Smart Seo | Sochtek
Author: sochtek
11. The $0 Seo Plan For Tradesmen: How To Rank Without Paying For Ads
Author: Captivate Designs
12. The Secret Weapon Of Top Nyc Web Designers: Ux Psychology Principles You're Missing
Author: Captivate Designs
13. Innovative Logo Design Services To Build Brand Trust
Author: Prettify Creative
14. Why Choose Laravel For Web Development In Riyadh
Author: Andy
15. Website Redesigning For Usa Businesses: How Indian Website Redesign Services Transform Your Brand
Author: Dyna Gilbert






