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. Telemedicine App Development Company In Malaysia: Key Features And BenefitsAuthor: Emed Healthtech
2. Wishlan - Innovating The Future Of Tech
Author: Himanshu
3. The Future Of Mobile App Development With Nasa And Nokia 4g Contract
Author: ByteAhead
4. Why Nivedita Infosystem Is India’s Go-to Solution For Professional Web Development Services
Author: nivedita infosystem
5. Building Success: Nivedita Infosystem’s Role In Professional Web Development Across India
Author: nivedita infosystem
6. Boost Your Online Presence With Nivedita Infosystem’s Professional Web Development Solutions
Author: nivedita infosystem
7. The Secret To Stunning Websites: Nivedita Infosystem’s Web Development Services In India
Author: nivedita infosystem
8. Why Regular Website Redesign Is Essential For Maintaining Seo Momentum?
Author: Dyna Gilbert
9. Top It Consulting Trends In The Usa: What To Expect In 2025
Author: Digileap
10. Transform Your Online Presence With Expert Website Redesign Services In New York
Author: Captivate Designs
11. Wordpress Development In Australia: Why You Need A Local Expert
Author: themerchantbuddy
12. Website Creators In Coimbatore
Author: cp
13. Top 6 Mistakes During App Development And App Marketing
Author: goodcoders
14. The Future Of Seo: What’s Next In 2025
Author: Niveditha Jain
15. Scraping Price Comparison Data With Python And Beautifulsoup
Author: DataZivot