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

Add Comment

Web Design Articles

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

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

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

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

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

6. How The Best Seo Companies In Dubai Help Businesses Achieve Sustainable Online Growth
Author: SanjuSeo

7. Web Design Company Sri Lanka
Author: Buddhika Jayanath

8. How To Build A Sportsbook Platform With A Betway Clone Script And Live Data Integration
Author: avery

9. How Blockchain Infrastructure Supports End-to-end Rwa Tokenization
Author: avery

10. Complex Optical Design In Madrid: What It Takes To Build High-performance Optical Systems
Author: Fotonica Gileyva

11. Maximize Roi With Expert Amazon Advertising Management Services
Author: MMF Infotech

12. A/b Tests On Your Website
Author: Scope Hosts

13. Escape The Ncr Smog: Build Your Dream Luxury Retreat At Naugaonfarmhouses
Author: santwhitelisted

14. Want To Sell On Zepto? Zane Makes Seller Onboarding Simpler And Faster
Author: Zane

15. Why Professional Powerpoint Design Uk Services Matter For Business Growth
Author: Visual Spiders

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