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

Add Comment

Web Design Articles

1. How To Develop An Adult Website: A Complete Development Guide
Author: Cloudy Bites

2. Why Ai Chatbots Became The First Thing Enterprises Upgraded In 2026
Author: RemoteState

3. What Is The Difference Between Custom And Ready-made Cryptocurrency Wallet Development?
Author: avery

4. Seo Company In Chennai: Your Partner For Long-term Online Success
Author: brainmetech

5. Stress-free Website Redesign Process
Author: VPS9

6. How Long Does It Take For Cpanel Website Setup?
Author: Scope Hosts

7. Why Custom Crm Development Is Essential For Growing Businesses
Author: Proses India

8. Mobile App Design In Hyderabad, Logo & Branding In Hyderabad And Ai Automations Company In Hyderabad
Author: weblinksolutions

9. Web Development Company In Hyderabad – Build A Strong Digital Presence
Author: weblinksolutions

10. How Web Development In Lagos Supports Long-term Business Growth?
Author: Webpadi

11. Entertainment Mobility Solutions With Music App Development
Author: brainbell10

12. Smart Website Design Company In Mumbai For Digital Growth
Author: Sunil Yadav

13. How To Use Google Analytics Boost Your Seo?
Author: brainbell10

14. How We Organized An Awesome Team Building?
Author: brainbell10

15. Transform Your Business Growth With Professional Web Design Services In Coimbatore
Author: Ashok Kumar

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