TelegramBots / Telegram.Bot

.NET Client for Telegram Bot API
https://telegrambots.github.io/book
MIT License
3.22k stars 690 forks source link

Login Widget Utilities #603

Closed poulad closed 6 years ago

poulad commented 6 years ago

Feature Request: Login Widget Utilities

Telegram recently added a Login Widget to authorize users.

We could have a few utilities to help with Login Widget authorization such as calculating this hash to check data integrity.

Example:

if (Utilities.IsLoginWidgetDataValid(authData)) {
  // save user info...
}
tuscen commented 6 years ago

System.Security.Cryptography.Algorithms requires netstandard1.3 as a minimal build target. We will have to rise our build target if we are going to provide this helper.

poulad commented 6 years ago

That might not be a big issue since we release a version for NET 4.5 as well.

MihaZupan commented 6 years ago

https://gist.github.com/MihaZupan/0d0a836c1fdb1c2dd983c88b8736ea5d

karb0f0s commented 6 years ago

new "home" for LoginWidget extension https://github.com/TelegramBots/Telegram.Bot.Extensions.LoginWidget