Vue component for Telegram login
npm install vue-telegram-loginvue-telegram-login is a Vue component for Telegram Login
Install with yarn:
``bash`
$ yarn add vue-telegram-login
Install with npm:
`bash`
$ npm i vue-telegram-login --save
or if you just want to try it out, unpkg has ready-to-use packages.
`html`Usage
Import vue-telegram-login, pass it to the components and use in your template
`html
telegram-login="YourTelegramBot"
@callback="yourCallbackFunction" />
telegram-login="YourTelegramBot"
redirect-url="https://your-website.io" />
`
| Name | Description | Required | Default |
| ------------- | ----------------------------------------------------------------------------- | -------- | ----------- |
| mode | 'callback' or 'redirect' | True | null |
| telegramLogin | Your telegram bot name | True | null |
| @callback | Your callback function, it will be called after success if mode is 'callback' | False | true |
| redirectUrl | Your redirect URL, user will be redirected if mode is 'redirect' | False | null |
| requestAccess | 'write' if you want to get access to send messages from your bot | False | 'read' |
| size | 'large', 'medium' or 'small' | False | 'large' |
| userpic | Show user photo, true or false | False | true |
| radius | Button corner radius (default depends on chosen size) | False | 20\14\10 |