vue-telegram-passport is a Vue component for Telegram Passport
Install with npm:
$ npm i vue-telegram-passport
Install with yarn:
$ yarn add vue-telegram-passport
or if you just want to try it out, unpkg has ready-to-use packages.
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-telegram-passport"></script>
Import vue-telegram-passport
, pass it to the components
and use in your template
<template>
...
<vueTelegramPassport
:authParameters="{
bot_id: 123456789,
scope: ['id_document', 'address_document', 'phone_number', 'email'],
public_key: 'Your public key',
nonce: 'Bot-specified payload',
}"
/>
...
</template>
<script>
import {vueTelegramPassport} from 'vue-telegram-passport'
export default {
...
components: {vueTelegramPassport},
...
}
</script>
You can play around with options on the official passport page
Name | Description | Required | Default |
---|---|---|---|
authParameters | docs | True | null |
authButtonOptions | docs | False | {} |
- Official blog post – basic description and examples
- Official docs – bot preparation instructions
- Official JS SDK docs – fields, options descriptions