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 Custom Crm Development Is Essential For Growing BusinessesAuthor: Proses India
2. Mobile App Design In Hyderabad, Logo & Branding In Hyderabad And Ai Automations Company In Hyderabad
Author: weblinksolutions
3. Web Development Company In Hyderabad – Build A Strong Digital Presence
Author: weblinksolutions
4. How Web Development In Lagos Supports Long-term Business Growth?
Author: Webpadi
5. Entertainment Mobility Solutions With Music App Development
Author: brainbell10
6. Smart Website Design Company In Mumbai For Digital Growth
Author: Sunil Yadav
7. How To Use Google Analytics Boost Your Seo?
Author: brainbell10
8. How We Organized An Awesome Team Building?
Author: brainbell10
9. Transform Your Business Growth With Professional Web Design Services In Coimbatore
Author: Ashok Kumar
10. How The Best Seo Companies In Dubai Help Businesses Achieve Sustainable Online Growth
Author: SanjuSeo
11. Web Design Company Sri Lanka
Author: Buddhika Jayanath
12. How To Build A Sportsbook Platform With A Betway Clone Script And Live Data Integration
Author: avery
13. How Blockchain Infrastructure Supports End-to-end Rwa Tokenization
Author: avery
14. Complex Optical Design In Madrid: What It Takes To Build High-performance Optical Systems
Author: Fotonica Gileyva
15. Maximize Roi With Expert Amazon Advertising Management Services
Author: MMF Infotech






