Telegram miniapp authorizer layer for Axum.
...
Router::new()
.route("/", get(login))
.layer(telegram_authorizer::AuthorizationLayer(bot_token));`
...
use telegram_authorizer::TelegramUser;
pub async fn login(TelegramUser(id): TelegramUser) -> impl IntoResponse {
tracing::info!("user: {:?}", id);
...
}
One should send initData as query string.