2 releases

0.2.0 Jul 11, 2024
0.1.1 Aug 6, 2024
0.1.0 Jul 9, 2024

#484 in Authentication

Download history 199/week @ 2024-07-09 1/week @ 2024-07-16 3/week @ 2024-07-30 113/week @ 2024-08-06 20/week @ 2024-08-13 14/week @ 2024-09-10 5/week @ 2024-09-17 21/week @ 2024-09-24 33/week @ 2024-10-01

73 downloads per month

MIT license

8KB
150 lines

telegram-authorizer

Telegram miniapp authorizer layer for Axum.

Rust Crates.io

Usage

Router

...
Router::new()
    .route("/", get(login))
    .layer(telegram_authorizer::AuthorizationLayer(bot_token));`
...

Handler

use telegram_authorizer::TelegramUser;

pub async fn login(TelegramUser(id): TelegramUser) -> impl IntoResponse {
    tracing::info!("user: {:?}", id);
    ...
}

Client

One should send initData as query string.

Dependencies

~11–20MB
~366K SLoC