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

Add Comment

Web Design Articles

1. Dark Mode, Light Speed: Modern Ux Trends In Web Development
Author: Suganya, Digital Marketing Intern.

2. Seo Service On A Low Budget With Brightara Media
Author: Brightara Media

3. New Technologies Booming In Mobile App Development
Author: Levontehcno

4. The Top Benefits Of Partnering With A Good Seo Company
Author: Liam Mackie

5. Why Choosing The Right Software Development Company In Delhi Can Boost Your Business
Author: Vikki kumar

6. Why Enseur Is A Top Event Management App For Modern Planners
Author: Enseur Tech

7. Customizable Web-based Erp Software In Noida Designed For Schools And Colleges
Author: CONTENT EDITOR FOR SAMPHIRE IT SOLUTIONS PVT LTD

8. How Custom Websites Drive Smarter Lead Generation And Crm Efficiency
Author: Wise Code Studio

9. Advanced Mobile Tracking Sg | Attendance 1 Sgd Monthly
Author: chinni jyothi

10. Employee Attendance Sg | Biometric Scanner 1 Sgd Per Month
Author: chinni jyothi

11. Top Seo Services In Delhi For Business Growth
Author: ayraphics

12. Advantages And Disadvantages Of A Static Website
Author: Manoj Singh

13. Top Dental Website Design Trends In 2025: What Your Clinic Needs To Stand Out Online
Author: PSM

14. How Can The Ecommerce Website Design Make Or Break Your Online Business?
Author: Liam Mackie

15. Best Practices To Boost Your Health & Wellness Products Selling Online
Author: Miten Shah

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