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

Add Comment

Web Design Articles

1. How To Choose The Best Web Development Agency In Australia
Author: Lukas

2. Local Seo Tips To Rank Your Business Higher
Author: Webgenix

3. Why Your Business Needs A Professional Website In 2025
Author: Sandy Kale

4. Software Quality Standards – How And Why We Applied Iso 25010?
Author: ByteAhead

5. Elevate Your Brand With A Top Web Design Agency In Nyc
Author: Captivate Designs

6. Building High-performance Software With Groot Technologies
Author: Groot Technologies

7. Web Design Chicago: Top Trends And Best Practices For 2025
Author: Nave Xander

8. Sharepoint Development Methods
Author: ByteAhead

9. Packers & Movers Mobile Application Development – Benefits & Cost
Author: ByteAhead

10. Web Development Course In Tirupati
Author: sidharthh

11. Top 5 Challenges In Prestashop To Shopify Migration And How Prestify Solves Them
Author: David

12. Top Web Development Companies For Startups: Features And Costs
Author: Gunjan

13. The Unseen Role Of Top Software Development Companies In Cybersecurity Solutions
Author: Gunjan

14. Master Seo Skills With Captivate Designs' Nyc Training
Author: Captivate Designs

15. The Topmost Benefits Of Choosing Ecommerce Website Design
Author: Liam Mackie

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