TelegramBots / Telegram.Bot.Extensions.LoginWidget

Allows you to generate embed JavaScript for the Telegram login widget and verify the hashes received
MIT License
32 stars 12 forks source link

All the time InvalidHash #13

Open mistek131995 opened 11 months ago

mistek131995 commented 11 months ago

Hi, I get an error all the time InvalidHash, What am I doing wrong?

I'm testing this on a local server, on port 80, and adding the domain to hosts.

var telegramBotToken = configuration["TelegramBotToken"];
var loginWidget = new LoginWidget(telegramBotToken);

var auth = loginWidget.CheckAuthorization(new SortedDictionary<string, string>()
    {
        {"id", query.id},
        {"first_name", query.first_name},
        {"username", query.username},
        {"photo_url", query.photo_url},
        {"auth_date", query.auth_date},
        {"hash", query.hash},
        {"last_name", query.last_name }
    });

Снимок экрана 2023-11-22 074715