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

Add Comment

Web Design Articles

1. Local Seo New York Ny: Best Strategies To Rank Your Business #1
Author: Captivate Designs

2. Boost Your Business Growth With Web Development Services
Author: Liam Mackie

3. Why Cricket Champion Is A Leading Choice For Cricket Live Line Api Solutions
Author: Cricket champion

4. Menu Design Services For Restaurants, Cafes & Bars
Author: designmymenu

5. Web Development Services By Czars India Pvt Ltd
Author: Czars India

6. Pay For Marketing, Get Your Website Free – The Smart Business Strategy In 2026
Author: salvatore nexus 9

7. Ignite School Growth With A Powerful Digital Identity Today
Author: om soft

8. Launch Your Own Classified Portal With A Stunning Website Design
Author: Rudram Technology Solutions

9. Driving Business Growth With Innovative Social Media Marketing And Website Development Services In Pune
Author: digitaldoraemon

10. Building Scalable Enterprise Applications With Strapi's Api-first Approach
Author: Andy

11. How To Build A Professional Website For Free Using Html Templates
Author: Andrew

12. Best Seo Companies In Uae: Choosing The Right Partner For Online Growth
Author: AnusreeGlobosoft

13. Top 10 Benefits Of Investing In Custom Software Development For Your Business
Author: Pawan Reddy

14. White Label Seo Basics For Agency Owners New To Outsourcing
Author: bharathi

15. Top 6 Wordpress Image Optimization Plugins In 2026
Author: Scope Hosts

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