123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Web-Design >> View Article

Vue 3 Telegram Login

Profile Picture
By Author: Rizwan Aslam
Total Articles: 1
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

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 )

Total Views: 363Word Count: 221See All articles From Author

Add Comment

Web Design Articles

1. Enhance Your Brand With A Graphic Design Company In Delhi
Author: Kliff Technologies

2. Harnessing Ai For Seo
Author: Brightara Media

3. Utility Mapping Services Vs. Utility Conversion Services: Where Gis Mapping Fits In
Author: Mukul Barma

4. Multiply Your Roi With Professional Point Cloud To Cad And Gis Services
Author: Mukul Barma

5. Dubai Web Design Experts | Elevate Your Online Presence
Author: Tequila Branding & Web Agency Dubai

6. Sustainable Seo For Long-term Success
Author: Brightara Media

7. Building Scalable Apis With Laravel: Best Practices And Tips
Author: Andy

8. Building Your Legacy: Why Your Business Needs A Top Branding Company In Brisbane
Author: Ankit

9. Professioneel Webdesignbedrijf Met Creatieve Oplossingen En Betrouwbare Wordpress-ondersteuning In Nederland
Author: Olivia Bakker

10. How To Build And Launch An Mvp Application – A Complete Guide?
Author: brainbell10

11. The Main Challenges For Website Builders In 2025
Author: Lucy James

12. Revolutionizing Online Presence: How Ai Is Transforming Web Design And Seo
Author: Vikram kumar

13. Top Considerations When Seeking A San Diego Branding Agency You Can Rely On
Author: Storm Brain

14. Software & Application Integration In Hyderabad
Author: vijaya

15. E Commerce Website Development Services For Your Business
Author: sidharthh

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: