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

Add Comment

Web Design Articles

1. How To Build An Effective Qa Team?
Author: brainbell10

2. How White Label Wordpress Development Solves Agency Workload Issues
Author: Technocrackers

3. Coaches And Therapists Have The Same Website Problem
Author: Samantha

4. How Ai Automation Features Reduce Risks In Defi Trading
Author: avery

5. How Binance Clone Script Improves Multi Device Trading Experience
Author: avery

6. How User Experience (ux) Impacts Website Performance And Engagement
Author: Power Marketing international (web-seo1)

7. The 2026 Strategic Blueprint: Architecting Authority In The Synthesis Economy
Author: Smartfish Designs

8. It Staff Augmentation In India: Benefits, Companies & Trends
Author: bharathi

9. Different Types Of Ssl Certificates For Your Business
Author: VPS9

10. How Professional Web Development Services Improve Brand Trust
Author: Sunjit

11. How Corporate Powerpoint Trends Are Changing Client Pitches In 2026
Author: Visual Spiders

12. How Long Does It Take To Build A Custom Dental Website Design For A Clinic?
Author: PSM Canada

13. Important Benefits Of Choosing Professional Website Design
Author: Liam Mackie

14. What Are The Key Benefits Of Using A Flash Loan Bot For Crypto Trading?
Author: avery

15. Smart Business Solutions By Easywebplans It Llc
Author: Easywebplans

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