Skip to content
docsv0.1.0

TelegramAuthService

Telegram Login Widget verification. Validates HMAC signature of widget data using the bot token.

TelegramAuthService::__construct()

public function __construct(string $botToken):

Parameters

Parameters of __construct()
NameTypeDescription
$botTokenstring

TelegramAuthService::verify()

public function verify(array $data): Milpa\OAuth\DTO\TelegramUserInfo

Verify the HMAC-SHA-256 signature of Telegram Login Widget data and reject payloads older than the 24-hour auth window.

Parameters

Parameters of verify()
NameTypeDescription
$dataarray