https://github.com/telegrambots/telegram.bot.extensions.loginwidget
Allows you to generate embed JavaScript for the Telegram login widget and verify the hashes received
https://github.com/telegrambots/telegram.bot.extensions.loginwidget
api bot login-widget telegram telegram-login
Last synced: 9 months ago
JSON representation
Allows you to generate embed JavaScript for the Telegram login widget and verify the hashes received
- Host: GitHub
- URL: https://github.com/telegrambots/telegram.bot.extensions.loginwidget
- Owner: TelegramBots
- License: mit
- Created: 2018-05-13T20:04:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-17T21:19:01.000Z (over 3 years ago)
- Last Synced: 2025-06-20T07:33:24.845Z (12 months ago)
- Topics: api, bot, login-widget, telegram, telegram-login
- Language: C#
- Homepage:
- Size: 29.3 KB
- Stars: 35
- Watchers: 9
- Forks: 12
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegram bots Login Widget
[](https://travis-ci.org/MihaZupan/Telegram.Bot.Extensions.LoginWidget)
[](https://ci.appveyor.com/project/MihaZupan/telegram-bot-extensions-loginwidget/branch/master)
Makes it simple to validate login widget authorization hashes
Built according to specifications published on [Telegram's website](https://core.telegram.org/widgets/login)
## Usage
```c#
// Parsed from the query string / from the callback object
Dictionary fields = QueryStringFields;
LoginWidget loginWidget = new LoginWidget("your API access Token");
if (loginWidget.CheckAuthorization(fields) == Authorization.Valid)
{
// ...
}
```
## Installation
Install as [NuGet package](https://www.nuget.org/packages/Telegram.Bot.Extensions.LoginWidget/):
Package manager:
```powershell
Install-Package Telegram.Bot.Extensions.LoginWidget
```