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. How A Web3 Design Agency Designs Interfaces For Better ClarityAuthor: david
2. Best Seo Company In Jaipur – Grow Faster With Hireseopro
Author: Hireseoprofessionals
3. Texas Electrician Website Designer: Why The Right Website Expert Can Help Your Business Grow
Author: abigail
4. How Can A Website’s Ux Design Influence Conversion Rates?
Author: Sanjay
5. What Is Strapi Cms: Key Features, Use Cases, And Benefits
Author: Andy
6. Latest Website Design Trends For Modern Businesses
Author: Rudram Technology Solutions
7. Digital Advertising Strategies That Maximize Roi Across Paid Media Channels
Author: Storm Brain
8. Stop Chasing Rankings - Start Owning Answers With Aeo In Mohali | Sochtek
Author: sochtek
9. Local Seo Optimization In Nyc: How To Rank Your Business In New York
Author: Captivate Designs
10. Web Design Company In Dhenkanal And Jagatsinghpur For Professional Business Websites
Author: Ethan Davis
11. Web Design Company In Keonjhar And Puri For High-quality Business Websites
Author: Ethan Davis
12. What Are The Latest Trends In Website Designing? Let’s Find Out!
Author: Liam Mackie
13. Ssl Certificate Types: Which Ssl Certificate Is Best For Website ?
Author: Jackson
14. Top E-commerce Growth Strategies By Sochtek For Local Businesses In Aerocity, Punjab
Author: sochtek
15. Email Marketing Course: Learn Strategies To Grow Your Business Faster
Author: Captivate Designs






