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: 371Word Count: 221See All articles From Author

Add Comment

Web Design Articles

1. Goognu Aws Consulting Services – Simplify Cloud Transformation With Proven Aws Expertise
Author: Goognu Data Services

2. Your One-stop Solution For Web Design & Digital Marketing
Author: Brightara Media

3. Modern Professional Mobile App Development Solutions
Author: Team Ozrit

4. From Code To Creativity: The Future Of Web Development With Ai Tools In 2025
Author: American Chase LLC

5. Elevate Your Online Presence With Social Media Marketing In Pune And Expert Website Design Services In Pune
Author: digitaldoraemon

6. How To Choose The Right Website Packages For Small Business: A Budget Vs. Features Comparison
Author: Nishant Desai

7. Shopify And Wordpress Finally Join Forces: What This Means For The Future Of Online Stores
Author: Matthew John

8. Website Development Company: Choosing The Right Partner To Build Your Online Presence
Author: MSM CoreTech Innovations

9. Best Social Bookmarking Sites & Ideas For Better Website Visibility
Author: Brightara Media

10. Ruby On Rails: The Ultimate Framework For Building Web Applications Quickly
Author: Andy

11. Mt Marketingbureau Positioneert Zich Als Toonaangevend Webdesign Bedrijf En Expert In Wordpress Ondersteuning
Author: Olivia Bakker

12. How Student Wellbeing Software Is Revolutionising Campus Support
Author: E2S Team

13. Web Design 2.0: The Impact Of Artificial Intelligence On Digital Marketing
Author: Vikram kumar

14. What To Look For In A Creative Agency In San Diego
Author: Storm Brain

15. Crafting Digital Excellence: Your Premier Web Design Company In Bhopal
Author: ashish yadav

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