telegram-checking-authorization
Version:
Checking authorization helper
23 lines (14 loc) • 701 B
Markdown
# telegram-checking-authorization
[](https://raw.githubusercontent.com/lolitaframework/telegram-checking-authorization/master/LICENSE)
Check [Telegram Login Widget](https://core.telegram.org/widgets/login) hash manually
## Installation
Install through npm:
```
npm install --save telegram-checking-authorization
```
## Usage
Use it in your app like so:
```javascript
import telegramCheckingAuthorization from 'telegram-checking-authorization';
if(telegramCheckingAuthorization(data, token)) console.log('Data is from telegram! ;)');
if(!telegramCheckingAuthorization(data, token)) console.log('Data is NOT from telegram :(')