Vue Telegram Passport

vue-telegram-passport is a Vue component for Telegram Passport

Installation

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>

Usage

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>

Props

You can play around with options on the official passport page

Name Description Required Default
authParameters docs True null
authButtonOptions docs False {}

GitHub

https://github.com/vchaptsev/vue-telegram-passport