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

You've to run this command to install it with npm:

$ npm i vue3-telegram-login --save
Next, You've to Import telegram-login-temp, pass it to the component, and then you can utilize it in your template.


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

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

Add Comment

Web Design Articles

1. What Is Digital Marketing Strategy And How To Create A Successful One?
Author: James Brown

2. Benefits Of Remote It Support
Author: pranathisoftwareservices

3. What Is The Role Of The Website Development Company?
Author: Bhavna Upadhyay

4. Your Go-to Strategy To Develop An Ecommerce App For Holiday Season
Author: Mosche

5. Free Wordpress Portfolio Theme For Creative Websites
Author: Themeshopy

6. Website Development In Karur
Author: weboney

7. Step-by-step Guide To Hire The Best Mobile Application Company!
Author: Virinchi Softwares

8. Best Semiconductors Service Company In Bangalore,india
Author: Guru

9. Wordpress Website Designers In Sydney Can Help Your Business Grow
Author: Amelia Thompson

10. Ecommerce And Augmented Reality
Author: tacticalwm

11. Advantage That Comes With The Use Of Printable Calendar
Author: january 2022 calendar printable

12. The Value Of Having A Professional Web Design For Your Organization
Author: Anu Sawant

13. Why Choose Wordpress Development Services
Author: deepaktechno

14. Free Charity Wordpress Theme For Charity Related Works
Author: themeshopy

15. What Is Web Design And Whom To Ask About Web Design?
Author: Dhirendra kumar

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